proxy: add some interface type assertions

This commit is contained in:
SataQiu
2019-12-27 18:30:25 +08:00
parent 9d31c9387c
commit 134c545b96
3 changed files with 8 additions and 0 deletions

View File

@@ -97,6 +97,8 @@ func (*NoopEndpointSliceHandler) OnEndpointSliceDelete(endpointSlice *discovery.
// OnEndpointSlicesSynced is a noop handler for EndpointSlice syncs.
func (*NoopEndpointSliceHandler) OnEndpointSlicesSynced() {}
var _ EndpointSliceHandler = &NoopEndpointSliceHandler{}
// EndpointsConfig tracks a set of endpoints configurations.
type EndpointsConfig struct {
listerSynced cache.InformerSynced
@@ -403,6 +405,8 @@ func (*NoopNodeHandler) OnNodeDelete(node *v1.Node) {}
// OnNodeSynced is a noop handler for Node syncs.
func (*NoopNodeHandler) OnNodeSynced() {}
var _ NodeHandler = &NoopNodeHandler{}
// NodeConfig tracks a set of node configurations.
// It accepts "set", "add" and "remove" operations of node via channels, and invokes registered handlers on change.
type NodeConfig struct {