Use narrowly scoped interfaces for client access
Use custom narrowly scoped interfaces for client access from the RollingUpdater and Resizer. This allows for more flexible downstream integration and unit testing without imposing a burden to implement the entire client.Interface for just a handful of methods.
This commit is contained in:
@@ -65,7 +65,7 @@ type objInterface interface {
|
||||
|
||||
func (reaper *ReplicationControllerReaper) Stop(namespace, name string) (string, error) {
|
||||
rc := reaper.ReplicationControllers(namespace)
|
||||
resizer, err := ResizerFor("ReplicationController", *reaper)
|
||||
resizer, err := ResizerFor("ReplicationController", &RealResizerClient{*reaper})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Reference in New Issue
Block a user