Fix golint failures in pkg/proxy
Review feedback - remove alias from imports fix comments
This commit is contained in:
@@ -200,7 +200,7 @@ type UpdateEndpointMapResult struct {
|
||||
LastChangeTriggerTimes []time.Time
|
||||
}
|
||||
|
||||
// UpdateEndpointsMap updates endpointsMap base on the given changes.
|
||||
// Update updates endpointsMap base on the given changes.
|
||||
func (em EndpointsMap) Update(changes *EndpointChangeTracker) (result UpdateEndpointMapResult) {
|
||||
result.StaleEndpoints = make([]ServiceEndpoint, 0)
|
||||
result.StaleServiceNames = make([]ServicePortName, 0)
|
||||
|
@@ -272,8 +272,8 @@ func (l *listenPortOpener) OpenLocalPort(lp *utilproxy.LocalPort) (utilproxy.Clo
|
||||
return openLocalPort(lp)
|
||||
}
|
||||
|
||||
// Proxier implements ProxyProvider
|
||||
var _ proxy.ProxyProvider = &Proxier{}
|
||||
// Proxier implements proxy.Provider
|
||||
var _ proxy.Provider = &Proxier{}
|
||||
|
||||
// NewProxier returns a new Proxier given an iptables Interface instance.
|
||||
// Because of the iptables logic, it is assumed that there is only a single Proxier active on a machine.
|
||||
|
@@ -271,8 +271,8 @@ func (r *realIPGetter) NodeIPs() (ips []net.IP, err error) {
|
||||
return ips, nil
|
||||
}
|
||||
|
||||
// Proxier implements ProxyProvider
|
||||
var _ proxy.ProxyProvider = &Proxier{}
|
||||
// Proxier implements proxy.Provider
|
||||
var _ proxy.Provider = &Proxier{}
|
||||
|
||||
// parseExcludedCIDRs parses the input strings and returns net.IPNet
|
||||
// The validation has been done earlier so the error condition will never happen under normal conditions
|
||||
|
@@ -25,12 +25,12 @@ import (
|
||||
"k8s.io/kubernetes/pkg/proxy/config"
|
||||
)
|
||||
|
||||
// ProxyProvider is the interface provided by proxier implementations.
|
||||
type ProxyProvider interface {
|
||||
// Provider is the interface provided by proxier implementations.
|
||||
type Provider interface {
|
||||
config.EndpointsHandler
|
||||
config.ServiceHandler
|
||||
|
||||
// Sync immediately synchronizes the ProxyProvider's current state to proxy rules.
|
||||
// Sync immediately synchronizes the Provider's current state to proxy rules.
|
||||
Sync()
|
||||
// SyncLoop runs periodic work.
|
||||
// This is expected to run as a goroutine or as the main loop of the app.
|
||||
|
@@ -138,8 +138,8 @@ type Proxier struct {
|
||||
stopChan chan struct{}
|
||||
}
|
||||
|
||||
// assert Proxier is a ProxyProvider
|
||||
var _ proxy.ProxyProvider = &Proxier{}
|
||||
// assert Proxier is a proxy.Provider
|
||||
var _ proxy.Provider = &Proxier{}
|
||||
|
||||
// A key for the portMap. The ip has to be a string because slices can't be map
|
||||
// keys.
|
||||
|
@@ -510,8 +510,8 @@ type closeable interface {
|
||||
Close() error
|
||||
}
|
||||
|
||||
// Proxier implements ProxyProvider
|
||||
var _ proxy.ProxyProvider = &Proxier{}
|
||||
// Proxier implements proxy.Provider
|
||||
var _ proxy.Provider = &Proxier{}
|
||||
|
||||
// NewProxier returns a new Proxier
|
||||
func NewProxier(
|
||||
|
@@ -92,8 +92,8 @@ type Proxier struct {
|
||||
hostIP net.IP
|
||||
}
|
||||
|
||||
// assert Proxier is a ProxyProvider
|
||||
var _ proxy.ProxyProvider = &Proxier{}
|
||||
// assert Proxier is a proxy.Provider
|
||||
var _ proxy.Provider = &Proxier{}
|
||||
|
||||
// A key for the portMap. The ip has to be a string because slices can't be map
|
||||
// keys.
|
||||
|
Reference in New Issue
Block a user