@@ -59,26 +59,6 @@ type NodeRecorder struct {
5959 coalesceLast bool
6060}
6161
62- type NodeOption func (* NodeRecorder )
63-
64- func WithCapacity (capacity int ) NodeOption {
65- return func (nr * NodeRecorder ) {
66- nr .capacity = capacity
67- }
68- }
69-
70- func WithTimestamper (tsr func () time.Time ) NodeOption {
71- return func (nr * NodeRecorder ) {
72- nr .timestamper = tsr
73- }
74- }
75-
76- func WithCoalescing (val bool ) NodeOption {
77- return func (nr * NodeRecorder ) {
78- nr .coalesceLast = val
79- }
80- }
81-
8262// NewNodeRecorder creates a new recorder for the given node with the given capacity.
8363// The record is a ring buffer, so only the latest <capacity> Statuses are kept at any time.
8464// The timestamper callback is used to mark times. Use `time.Now` if unsure.
@@ -161,7 +141,7 @@ func (nr *NodeRecorder) Cap() int {
161141 return nr .capacity
162142}
163143
164- // Content() returns a shallow copy of all the recorded statuses.
144+ // Content returns a shallow copy of all the recorded statuses.
165145func (nr * NodeRecorder ) Content () []RecordedStatus {
166146 return nr .statuses
167147}
@@ -181,32 +161,6 @@ type Recorder struct {
181161 coalesceLast bool
182162}
183163
184- type Option func (* Recorder )
185-
186- func WithNodeCapacity (nodeCapacity int ) Option {
187- return func (rec * Recorder ) {
188- rec .nodeCapacity = nodeCapacity
189- }
190- }
191-
192- func WithNodeTimestamper (tsr func () time.Time ) Option {
193- return func (rec * Recorder ) {
194- rec .timestamper = tsr
195- }
196- }
197-
198- func WithMaxNodes (maxNodes int ) Option {
199- return func (rec * Recorder ) {
200- rec .maxNodes = maxNodes
201- }
202- }
203-
204- func WithPFPCoalescing (val bool ) Option {
205- return func (rr * Recorder ) {
206- rr .coalesceLast = val
207- }
208- }
209-
210164// NewRecorder creates a new recorder up to the given node count, each with the given capacity.
211165// Each per-node recorder is a ring buffer, so only the latest <nodeCapacity> Statuses are kept
212166// at any time for each node. The per-node records are created lazily as needed.
@@ -298,7 +252,7 @@ func (rr *Recorder) Push(st podfingerprint.Status) error {
298252 return nr .Push (st )
299253}
300254
301- // Content() returns a shallow copy of all the recorded statuses, by node name.
255+ // Content returns a shallow copy of all the recorded statuses, by node name.
302256func (rr * Recorder ) Content () map [string ][]RecordedStatus {
303257 ret := make (map [string ][]RecordedStatus , len (rr .nodes ))
304258 for nodeName , nr := range rr .nodes {
0 commit comments