Move some test-only code into the test

This commit is contained in:
Tim Hockin
2014-09-20 11:38:05 -07:00
parent 20826e6d50
commit a559d8d9b2
2 changed files with 11 additions and 11 deletions

View File

@@ -317,15 +317,6 @@ func NewProxier(loadBalancer LoadBalancer, address string) *Proxier {
}
}
// StopProxy stops the proxy for the named service.
func (proxier *Proxier) StopProxy(service string) error {
info, found := proxier.getServiceInfo(service)
if !found {
return fmt.Errorf("unknown service: %s", service)
}
return proxier.stopProxy(service, info)
}
// This assumes proxier.mu is not locked.
func (proxier *Proxier) stopProxy(service string, info *serviceInfo) error {
proxier.mu.Lock()