mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Simplify Watch() signature in clients.
This commit is contained in:
@@ -38,7 +38,7 @@ type EndpointsInterface interface {
|
||||
Get(name string) (*api.Endpoints, error)
|
||||
Delete(name string) error
|
||||
Update(endpoints *api.Endpoints) (*api.Endpoints, error)
|
||||
Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// endpoints implements EndpointsInterface
|
||||
@@ -85,14 +85,12 @@ func (c *endpoints) Delete(name string) error {
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested endpoints for a service.
|
||||
func (c *endpoints) Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (c *endpoints) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
Resource("endpoints").
|
||||
VersionedParams(&opts, api.Scheme).
|
||||
LabelsSelectorParam(label).
|
||||
FieldsSelectorParam(field).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user