mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Simplify Watch() signature in clients.
This commit is contained in:
@@ -165,7 +165,9 @@ func newPodStore(c *client.Client, namespace string, label labels.Selector, fiel
|
||||
return c.Pods(namespace).List(label, field)
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return c.Pods(namespace).Watch(label, field, options)
|
||||
options.LabelSelector.Selector = label
|
||||
options.FieldSelector.Selector = field
|
||||
return c.Pods(namespace).Watch(options)
|
||||
},
|
||||
}
|
||||
store := cache.NewStore(cache.MetaNamespaceKeyFunc)
|
||||
|
||||
Reference in New Issue
Block a user