MCPcopy
hub / github.com/istio/istio / InNetwork

Method InNetwork

pilot/pkg/model/context.go:421–423  ·  view source on GitHub ↗

InNetwork returns true if the proxy is on the given network, or if either the proxy's network or the given network is unspecified ("").

(network network.ID)

Source from the content-addressed store, hash-verified

419// InNetwork returns true if the proxy is on the given network, or if either
420// the proxy's network or the given network is unspecified ("").
421func (node *Proxy) InNetwork(network network.ID) bool {
422 return node == nil || identifier.IsSameOrEmpty(network.String(), node.Metadata.Network.String())
423}
424
425// InCluster returns true if the proxy is in the given cluster, or if either
426// the proxy's cluster id or the given cluster id is unspecified ("").

Callers 3

BuildNameTableFunction · 0.80
filterIstioEndpointMethod · 0.80

Implementers 2

TestProxypkg/envoy/agent_test.go
envoypkg/envoy/proxy.go

Calls 2

IsSameOrEmptyFunction · 0.92
StringMethod · 0.65

Tested by

no test coverage detected