kube-proxy: OnServiceUpdate takes pointers

This signature is more consistent with OnEndpointsUpdate and removes a
copy loop.  This is part on ongoing cleanup to rate-limit iptables
calls.
This commit is contained in:
Tim Hockin
2017-03-31 21:48:39 -07:00
parent a8e552832d
commit adf30aa2e1
13 changed files with 97 additions and 98 deletions

View File

@@ -20,15 +20,10 @@ import (
"fmt"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/pkg/api"
)
// ProxyProvider is the interface provided by proxier implementations.
type ProxyProvider interface {
// 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.
OnServiceUpdate(services []api.Service)
// Sync immediately synchronizes the ProxyProvider's current state to iptables.
Sync()
// SyncLoop runs periodic work.