mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Simplify Watch() signature in clients.
This commit is contained in:
@@ -36,7 +36,7 @@ type NamespaceInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*api.NamespaceList, error)
|
||||
Delete(name string) error
|
||||
Update(item *api.Namespace) (*api.Namespace, error)
|
||||
Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Finalize(item *api.Namespace) (*api.Namespace, error)
|
||||
Status(item *api.Namespace) (*api.Namespace, error)
|
||||
}
|
||||
@@ -115,12 +115,10 @@ func (c *namespaces) Delete(name string) error {
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||
func (c *namespaces) Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (c *namespaces) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Prefix("watch").
|
||||
Resource("namespaces").
|
||||
VersionedParams(&opts, api.Scheme).
|
||||
LabelsSelectorParam(label).
|
||||
FieldsSelectorParam(field).
|
||||
Watch()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user