proxy: consolidate ServicesHandler/EndpointsHandler into ProxyProvider

Proxies should be able to cleanly figure out when endpoints have been synced,
so make all ProxyProviders also implement EndpointsHandler and pass those
through to loadbalancers when required.
This commit is contained in:
Dan Williams
2018-12-04 23:35:34 -06:00
parent 92a2076149
commit 4b07f80d20
13 changed files with 80 additions and 81 deletions

View File

@@ -21,10 +21,14 @@ import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/pkg/proxy/config"
)
// ProxyProvider is the interface provided by proxier implementations.
type ProxyProvider interface {
config.EndpointsHandler
config.ServiceHandler
// Sync immediately synchronizes the ProxyProvider's current state to proxy rules.
Sync()
// SyncLoop runs periodic work.