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:
@@ -37,7 +37,7 @@ type IngressInterface interface {
|
||||
Create(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
Update(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
}
|
||||
|
||||
@@ -94,14 +94,12 @@ func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) {
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested ingress.
|
||||
func (c *ingress) Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (c *ingress) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
Resource("ingresses").
|
||||
VersionedParams(&opts, api.Scheme).
|
||||
LabelsSelectorParam(label).
|
||||
FieldsSelectorParam(field).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user