Refactor pkg/proxy/config's ServiceConfigHandler and EndpointsConfigHandler to have different update methods.
Refactor `pkg/proxy/config`’s ServiceConfigHandler.OnUpdate and EndpointsConfigHandler.OnUpdate to different method names as they have different signatures. This will let the new proxy (https://github.com/GoogleCloudPlatform/kubernetes/issues/3760) implement both interfaces. Since we won’t need a separate loadbalancer structure (load balancing is handled in the proxy rules), we will simply handle both event types from the same object.
This commit is contained in:
@@ -25,10 +25,10 @@ import (
|
||||
|
||||
// ProxyProvider is the interface provided by proxier implementations.
|
||||
type ProxyProvider interface {
|
||||
// OnUpdate manages the active set of service proxies.
|
||||
// OnServiceUpdate manages the active set of service proxies.
|
||||
// Active service proxies are reinitialized if found in the update set or
|
||||
// removed if missing from the update set.
|
||||
OnUpdate(services []api.Service)
|
||||
OnServiceUpdate(services []api.Service)
|
||||
// SyncLoop runs periodic work.
|
||||
// This is expected to run as a goroutine or as the main loop of the app.
|
||||
// It does not return.
|
||||
|
Reference in New Issue
Block a user