mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	update informer for client-go 0.27 (#6038)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
		| @@ -29,7 +29,7 @@ type RecordLatencyFunc func(meta.Object) | ||||
| // DefaultProcessor is based on the Process function from cache.NewIndexerInformer except it does a conversion. | ||||
| func DefaultProcessor(convert ToFunc, recordLatency *EndpointLatencyRecorder) ProcessorBuilder { | ||||
| 	return func(clientState cache.Indexer, h cache.ResourceEventHandler) cache.ProcessFunc { | ||||
| 		return func(obj interface{}) error { | ||||
| 		return func(obj interface{}, isInitialList bool) error { | ||||
| 			for _, d := range obj.(cache.Deltas) { | ||||
| 				if recordLatency != nil { | ||||
| 					if o, ok := d.Object.(meta.Object); ok { | ||||
| @@ -51,7 +51,7 @@ func DefaultProcessor(convert ToFunc, recordLatency *EndpointLatencyRecorder) Pr | ||||
| 						if err := clientState.Add(obj); err != nil { | ||||
| 							return err | ||||
| 						} | ||||
| 						h.OnAdd(obj) | ||||
| 						h.OnAdd(obj, isInitialList) | ||||
| 					} | ||||
| 					if recordLatency != nil { | ||||
| 						recordLatency.record() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user