Simplify Watch() signature in clients.
This commit is contained in:
@@ -37,7 +37,7 @@ type ReplicationControllerInterface interface {
|
||||
Update(ctrl *api.ReplicationController) (*api.ReplicationController, error)
|
||||
UpdateStatus(ctrl *api.ReplicationController) (*api.ReplicationController, error)
|
||||
Delete(name string) error
|
||||
Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// replicationControllers implements ReplicationControllersNamespacer interface
|
||||
@@ -92,13 +92,11 @@ func (c *replicationControllers) Delete(name string) error {
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested controllers.
|
||||
func (c *replicationControllers) Watch(label labels.Selector, field fields.Selector, opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (c *replicationControllers) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
Resource("replicationControllers").
|
||||
VersionedParams(&opts, api.Scheme).
|
||||
LabelsSelectorParam(label).
|
||||
FieldsSelectorParam(field).
|
||||
Watch()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user