Documentation ¶
Index ¶
- Constants
- Variables
- func MockAggregatedListNetworkEndpointGroupHook(ctx context.Context, fl *filter.F, m *cloud.MockNetworkEndpointGroups) (bool, map[string][]*compute.NetworkEndpointGroup, error)
- func MockAlphaAggregatedListNetworkEndpointGroupHook(ctx context.Context, fl *filter.F, m *cloud.MockAlphaNetworkEndpointGroups) (bool, map[string][]*computealpha.NetworkEndpointGroup, error)
- func MockAlphaAttachNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) error
- func MockAlphaDetachNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) error
- func MockAlphaListNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) ([]*computealpha.NetworkEndpointWithHealthStatus, error)
- func MockAttachNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) error
- func MockDetachNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) error
- func MockListNetworkEndpointsHook(ctx context.Context, key *meta.Key, ...) ([]*compute.NetworkEndpointWithHealthStatus, error)
- func MockNetworkEndpointAPIs(fakeGCE *gce.Cloud)
- func NewFakeZoneGetter() *fakeZoneGetter
- type EndpointPodMap
- type EndpointsCalculatorMode
- type FakeNetworkEndpointGroupCloud
- func (f *FakeNetworkEndpointGroupCloud) AggregatedListNetworkEndpointGroup(version meta.Version) (map[*meta.Key]*composite.NetworkEndpointGroup, error)
- func (f *FakeNetworkEndpointGroupCloud) AttachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, ...) error
- func (f *FakeNetworkEndpointGroupCloud) CreateNetworkEndpointGroup(neg *composite.NetworkEndpointGroup, zone string) error
- func (f *FakeNetworkEndpointGroupCloud) DeleteNetworkEndpointGroup(name string, zone string, version meta.Version) error
- func (f *FakeNetworkEndpointGroupCloud) DetachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, ...) error
- func (f *FakeNetworkEndpointGroupCloud) GetNetworkEndpointGroup(name string, zone string, version meta.Version) (*composite.NetworkEndpointGroup, error)
- func (f *FakeNetworkEndpointGroupCloud) ListNetworkEndpointGroup(zone string, version meta.Version) ([]*composite.NetworkEndpointGroup, error)
- func (f *FakeNetworkEndpointGroupCloud) ListNetworkEndpoints(name, zone string, showHealthStatus bool, version meta.Version) ([]*composite.NetworkEndpointWithHealthStatus, error)
- func (f *FakeNetworkEndpointGroupCloud) NetworkURL() string
- func (f *FakeNetworkEndpointGroupCloud) SubnetworkURL() string
- type NegSyncer
- type NegSyncerKey
- type NegSyncerManager
- type NetworkEndpoint
- type NetworkEndpointEntry
- type NetworkEndpointGroupCloud
- type NetworkEndpointGroupNamer
- type NetworkEndpointSet
- func (s NetworkEndpointSet) Delete(items ...NetworkEndpoint)
- func (s NetworkEndpointSet) Difference(s2 NetworkEndpointSet) NetworkEndpointSet
- func (s1 NetworkEndpointSet) Equal(s2 NetworkEndpointSet) bool
- func (s NetworkEndpointSet) Has(item NetworkEndpoint) bool
- func (s NetworkEndpointSet) HasAll(items ...NetworkEndpoint) bool
- func (s NetworkEndpointSet) HasAny(items ...NetworkEndpoint) bool
- func (s NetworkEndpointSet) Insert(items ...NetworkEndpoint)
- func (s1 NetworkEndpointSet) Intersection(s2 NetworkEndpointSet) NetworkEndpointSet
- func (s1 NetworkEndpointSet) IsSuperset(s2 NetworkEndpointSet) bool
- func (s NetworkEndpointSet) Len() int
- func (s NetworkEndpointSet) List() []NetworkEndpoint
- func (s NetworkEndpointSet) PopAny() (NetworkEndpoint, bool)
- func (s1 NetworkEndpointSet) Union(s2 NetworkEndpointSet) NetworkEndpointSet
- type NetworkEndpointStore
- type NetworkEndpointType
- type NetworkEndpointsCalculator
- type PortInfo
- type PortInfoMap
- func NewPortInfoMap(namespace, name string, svcPortTupleSet SvcPortTupleSet, ...) PortInfoMap
- func NewPortInfoMapForVMIPNEG(namespace, name string, namer NetworkEndpointGroupNamer, randomize bool) PortInfoMap
- func NewPortInfoMapWithDestinationRule(namespace, name string, svcPortTupleSet SvcPortTupleSet, ...) (PortInfoMap, error)
- func (p1 PortInfoMap) Difference(p2 PortInfoMap) PortInfoMap
- func (p1 PortInfoMap) Merge(p2 PortInfoMap) error
- func (p1 PortInfoMap) NegsWithReadinessGate() sets.String
- func (p1 PortInfoMap) ToPortNegMap() annotations.PortNegMap
- func (p1 PortInfoMap) ToPortSubsetNegMap() annotations.PortSubsetNegMap
- type PortInfoMapKey
- type SvcPortTuple
- type SvcPortTupleSet
- type ZoneGetter
Constants ¶
const ( TestZone1 = "zone1" TestZone2 = "zone2" TestInstance1 = "instance1" TestInstance2 = "instance2" TestInstance3 = "instance3" TestInstance4 = "instance4" TestInstance5 = "instance5" TestInstance6 = "instance6" )
const ( VmIpPortEndpointType = NetworkEndpointType("GCE_VM_IP_PORT") VmIpEndpointType = NetworkEndpointType("GCE_VM_IP") NonGCPPrivateEndpointType = NetworkEndpointType("NON_GCP_PRIVATE_IP_PORT") L7Mode = EndpointsCalculatorMode("L7") L4LocalMode = EndpointsCalculatorMode("L4, ExternalTrafficPolicy:Local") L4ClusterMode = EndpointsCalculatorMode("L4, ExternalTrafficPolicy:Cluster") )
Variables ¶
var NotFoundError = fmt.Errorf("not Found")
Functions ¶
func MockAggregatedListNetworkEndpointGroupHook ¶ added in v1.7.0
func MockAggregatedListNetworkEndpointGroupHook(ctx context.Context, fl *filter.F, m *cloud.MockNetworkEndpointGroups) (bool, map[string][]*compute.NetworkEndpointGroup, error)
TODO: move this logic into code gen TODO: make AggregateList return map[meta.Key]Object
func MockAlphaAggregatedListNetworkEndpointGroupHook ¶ added in v1.9.0
func MockAlphaAggregatedListNetworkEndpointGroupHook(ctx context.Context, fl *filter.F, m *cloud.MockAlphaNetworkEndpointGroups) (bool, map[string][]*computealpha.NetworkEndpointGroup, error)
func MockAlphaAttachNetworkEndpointsHook ¶ added in v1.9.0
func MockAlphaAttachNetworkEndpointsHook(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroupsAttachEndpointsRequest, m *cloud.MockAlphaNetworkEndpointGroups) error
func MockAlphaDetachNetworkEndpointsHook ¶ added in v1.9.0
func MockAlphaDetachNetworkEndpointsHook(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroupsDetachEndpointsRequest, m *cloud.MockAlphaNetworkEndpointGroups) error
func MockAlphaListNetworkEndpointsHook ¶ added in v1.9.0
func MockAlphaListNetworkEndpointsHook(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroupsListEndpointsRequest, filter *filter.F, m *cloud.MockAlphaNetworkEndpointGroups) ([]*computealpha.NetworkEndpointWithHealthStatus, error)
func MockAttachNetworkEndpointsHook ¶ added in v1.5.0
func MockDetachNetworkEndpointsHook ¶ added in v1.5.0
func MockListNetworkEndpointsHook ¶ added in v1.5.0
func MockNetworkEndpointAPIs ¶ added in v1.5.0
func NewFakeZoneGetter ¶
func NewFakeZoneGetter() *fakeZoneGetter
Types ¶
type EndpointPodMap ¶ added in v1.6.0
type EndpointPodMap map[NetworkEndpoint]types.NamespacedName
EndpointPodMap is a map from network endpoint to a namespaced name of a pod
type EndpointsCalculatorMode ¶ added in v1.9.0
type EndpointsCalculatorMode string
type FakeNetworkEndpointGroupCloud ¶
type FakeNetworkEndpointGroupCloud struct { NetworkEndpointGroups map[string][]*composite.NetworkEndpointGroup NetworkEndpoints map[string][]*composite.NetworkEndpoint Subnetwork string Network string // contains filtered or unexported fields }
func (*FakeNetworkEndpointGroupCloud) AggregatedListNetworkEndpointGroup ¶
func (f *FakeNetworkEndpointGroupCloud) AggregatedListNetworkEndpointGroup(version meta.Version) (map[*meta.Key]*composite.NetworkEndpointGroup, error)
func (*FakeNetworkEndpointGroupCloud) AttachNetworkEndpoints ¶
func (f *FakeNetworkEndpointGroupCloud) AttachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, version meta.Version) error
func (*FakeNetworkEndpointGroupCloud) CreateNetworkEndpointGroup ¶
func (f *FakeNetworkEndpointGroupCloud) CreateNetworkEndpointGroup(neg *composite.NetworkEndpointGroup, zone string) error
func (*FakeNetworkEndpointGroupCloud) DeleteNetworkEndpointGroup ¶
func (*FakeNetworkEndpointGroupCloud) DetachNetworkEndpoints ¶
func (f *FakeNetworkEndpointGroupCloud) DetachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, version meta.Version) error
func (*FakeNetworkEndpointGroupCloud) GetNetworkEndpointGroup ¶
func (f *FakeNetworkEndpointGroupCloud) GetNetworkEndpointGroup(name string, zone string, version meta.Version) (*composite.NetworkEndpointGroup, error)
func (*FakeNetworkEndpointGroupCloud) ListNetworkEndpointGroup ¶
func (f *FakeNetworkEndpointGroupCloud) ListNetworkEndpointGroup(zone string, version meta.Version) ([]*composite.NetworkEndpointGroup, error)
func (*FakeNetworkEndpointGroupCloud) ListNetworkEndpoints ¶
func (f *FakeNetworkEndpointGroupCloud) ListNetworkEndpoints(name, zone string, showHealthStatus bool, version meta.Version) ([]*composite.NetworkEndpointWithHealthStatus, error)
func (*FakeNetworkEndpointGroupCloud) NetworkURL ¶
func (f *FakeNetworkEndpointGroupCloud) NetworkURL() string
func (*FakeNetworkEndpointGroupCloud) SubnetworkURL ¶
func (f *FakeNetworkEndpointGroupCloud) SubnetworkURL() string
type NegSyncer ¶
type NegSyncer interface { // Start starts the syncer. This call is synchronous. It will return after syncer is started. Start() error // Stop stops the syncer. This call is asynchronous. It will not block until syncer is stopped. Stop() // Sync signals the syncer to sync NEG. This call is asynchronous. Syncer will sync once it becomes idle. Sync() bool // IsStopped returns true if syncer is stopped IsStopped() bool // IsShuttingDown returns true if syncer is shutting down IsShuttingDown() bool }
NegSyncer is an interface to interact with syncer
type NegSyncerKey ¶ added in v1.6.0
type NegSyncerKey struct { // Namespace of service Namespace string // Name of service Name string // PortTuple is the port tuple of the service backing the NEG PortTuple SvcPortTuple // Subset name, subset is defined in Istio:DestinationRule, this is only used // when --enable-csm=true. Subset string // Subset label, should set together with Subset. SubsetLabels string // NegType is the type of the network endpoints in this NEG. NegType NetworkEndpointType }
NegSyncerKey includes information to uniquely identify a NEG syncer
func (NegSyncerKey) GetAPIVersion ¶ added in v1.8.0
func (key NegSyncerKey) GetAPIVersion() meta.Version
GetAPIVersion returns the compute API version to be used in order to create the negType specified in the given NegSyncerKey.
func (NegSyncerKey) String ¶ added in v1.6.0
func (key NegSyncerKey) String() string
type NegSyncerManager ¶
type NegSyncerManager interface { // EnsureSyncer ensures corresponding syncers are started and stops any unnecessary syncer // portMap is a map of ServicePort Port to TargetPort EnsureSyncers(namespace, name string, portMap PortInfoMap) error // StopSyncer stops all syncers related to the service. This call is asynchronous. It will not wait for all syncers to stop. StopSyncer(namespace, name string) // Sync signals all syncers related to the service to sync. This call is asynchronous. Sync(namespace, name string) // SyncNodes signals all syncers watching nodes to sync. This call is asynchronous. SyncNodes() // GC garbage collects network endpoint group and syncers GC() error // ShutDown shuts down the manager ShutDown() }
NegSyncerManager is an interface for controllers to manage syncer
type NetworkEndpoint ¶ added in v1.6.0
NetworkEndpoint contains the essential information for each network endpoint in a NEG
type NetworkEndpointEntry ¶ added in v1.5.0
type NetworkEndpointEntry struct { NetworkEndpoint *composite.NetworkEndpoint Healths []*composite.HealthStatusForNetworkEndpoint }
type NetworkEndpointGroupCloud ¶
type NetworkEndpointGroupCloud interface { GetNetworkEndpointGroup(name string, zone string, version meta.Version) (*composite.NetworkEndpointGroup, error) ListNetworkEndpointGroup(zone string, version meta.Version) ([]*composite.NetworkEndpointGroup, error) AggregatedListNetworkEndpointGroup(version meta.Version) (map[*meta.Key]*composite.NetworkEndpointGroup, error) CreateNetworkEndpointGroup(neg *composite.NetworkEndpointGroup, zone string) error DeleteNetworkEndpointGroup(name string, zone string, version meta.Version) error AttachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, version meta.Version) error DetachNetworkEndpoints(name, zone string, endpoints []*composite.NetworkEndpoint, version meta.Version) error ListNetworkEndpoints(name, zone string, showHealthStatus bool, version meta.Version) ([]*composite.NetworkEndpointWithHealthStatus, error) NetworkURL() string SubnetworkURL() string }
NetworkEndpointGroupCloud is an interface for managing gce network endpoint group.
func NewAdapter ¶ added in v1.6.0
func NewAdapter(g *gce.Cloud) NetworkEndpointGroupCloud
NewAdapter takes a Cloud and returns a NetworkEndpointGroupCloud.
func NewFakeNetworkEndpointGroupCloud ¶
func NewFakeNetworkEndpointGroupCloud(subnetwork, network string) NetworkEndpointGroupCloud
type NetworkEndpointGroupNamer ¶
type NetworkEndpointGroupNamer interface { NEG(namespace, name string, port int32) string VMIPNEG(namespace, name string) string NEGWithSubset(namespace, name, subset string, port int32) string IsNEG(name string) bool }
NetworkEndpointGroupNamer is an interface for generating network endpoint group name.
type NetworkEndpointSet ¶ added in v1.6.0
type NetworkEndpointSet map[NetworkEndpoint]struct{}
NetworkEndpointSet is a set of NetworkEndpoints, implemented via map[NetworkEndpoint]struct{} for minimal memory consumption.
func NetworkEndpointSetKeySet ¶ added in v1.6.0
func NetworkEndpointSetKeySet(theMap interface{}) NetworkEndpointSet
NetworkEndpointSetKeySet creates a NetworkEndpointSet from a keys of a map[NetworkEndpoint](? extends interface{}). If the value passed in is not actually a map, this will panic.
func NewNetworkEndpointSet ¶ added in v1.6.0
func NewNetworkEndpointSet(items ...NetworkEndpoint) NetworkEndpointSet
NewNetworkEndpointSet creates a NetworkEndpointSet from a list of values.
func (NetworkEndpointSet) Delete ¶ added in v1.6.0
func (s NetworkEndpointSet) Delete(items ...NetworkEndpoint)
Delete removes all items from the set.
func (NetworkEndpointSet) Difference ¶ added in v1.6.0
func (s NetworkEndpointSet) Difference(s2 NetworkEndpointSet) NetworkEndpointSet
Difference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}
func (NetworkEndpointSet) Equal ¶ added in v1.6.0
func (s1 NetworkEndpointSet) Equal(s2 NetworkEndpointSet) bool
Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)
func (NetworkEndpointSet) Has ¶ added in v1.6.0
func (s NetworkEndpointSet) Has(item NetworkEndpoint) bool
Has returns true if and only if item is contained in the set.
func (NetworkEndpointSet) HasAll ¶ added in v1.6.0
func (s NetworkEndpointSet) HasAll(items ...NetworkEndpoint) bool
HasAll returns true if and only if all items are contained in the set.
func (NetworkEndpointSet) HasAny ¶ added in v1.6.0
func (s NetworkEndpointSet) HasAny(items ...NetworkEndpoint) bool
HasAny returns true if any items are contained in the set.
func (NetworkEndpointSet) Insert ¶ added in v1.6.0
func (s NetworkEndpointSet) Insert(items ...NetworkEndpoint)
Insert adds items to the set.
func (NetworkEndpointSet) Intersection ¶ added in v1.6.0
func (s1 NetworkEndpointSet) Intersection(s2 NetworkEndpointSet) NetworkEndpointSet
Intersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}
func (NetworkEndpointSet) IsSuperset ¶ added in v1.6.0
func (s1 NetworkEndpointSet) IsSuperset(s2 NetworkEndpointSet) bool
IsSuperset returns true if and only if s1 is a superset of s2.
func (NetworkEndpointSet) Len ¶ added in v1.6.0
func (s NetworkEndpointSet) Len() int
Len returns the size of the set.
func (NetworkEndpointSet) List ¶ added in v1.6.0
func (s NetworkEndpointSet) List() []NetworkEndpoint
List returns the slice with contents in random order.
func (NetworkEndpointSet) PopAny ¶ added in v1.6.0
func (s NetworkEndpointSet) PopAny() (NetworkEndpoint, bool)
PopAny returns a single element from the set.
func (NetworkEndpointSet) Union ¶ added in v1.6.0
func (s1 NetworkEndpointSet) Union(s2 NetworkEndpointSet) NetworkEndpointSet
Union returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}
type NetworkEndpointStore ¶ added in v1.5.0
type NetworkEndpointStore map[meta.Key][]NetworkEndpointEntry
func GetNetworkEndpointStore ¶ added in v1.7.0
func GetNetworkEndpointStore(negCloud NetworkEndpointGroupCloud) NetworkEndpointStore
GetNetworkEndpointStore is a helper function to access the NetworkEndpointStore of the mock NEG cloud
func (NetworkEndpointStore) AddNetworkEndpointHealthStatus ¶ added in v1.7.0
func (s NetworkEndpointStore) AddNetworkEndpointHealthStatus(key meta.Key, entries []NetworkEndpointEntry)
type NetworkEndpointType ¶ added in v1.8.0
type NetworkEndpointType string
type NetworkEndpointsCalculator ¶ added in v1.9.0
type NetworkEndpointsCalculator interface { // CalculateEndpoints computes the NEG endpoints based on service endpoints and the current NEG state and returns a // map of zone name to network endpoint set CalculateEndpoints(ep *v1.Endpoints, currentMap map[string]NetworkEndpointSet) (map[string]NetworkEndpointSet, EndpointPodMap, error) // Mode indicates the mode that the EndpointsCalculator is operating in. Mode() EndpointsCalculatorMode }
type PortInfo ¶ added in v1.6.0
type PortInfo struct { // PortTuple is port tuple of a service. PortTuple SvcPortTuple // Subset name, subset is defined in Istio:DestinationRule, this is only used // when --enable-csm=true. Subset string // Subset label, should set together with Subset. SubsetLabels string // NegName is the name of the NEG NegName string // ReadinessGate indicates if the NEG associated with the port has NEG readiness gate enabled // This is enabled with service port is reference by ingress. // If the service port is only exposed as stand alone NEG, it should not be enbled. ReadinessGate bool // RandomizeEndpoints indicates if the endpoints for the NEG associated with this port need to // be selected at random, rather than selecting the endpoints of this service. This is applicable // in GCE_VM_IP NEGs where the endpoints are the nodes instead of pods. RandomizeEndpoints bool }
PortInfo contains information associated with service port
type PortInfoMap ¶ added in v1.6.0
type PortInfoMap map[PortInfoMapKey]PortInfo
PortInfoMap is a map of PortInfoMapKey:PortInfo
func NewPortInfoMap ¶ added in v1.6.0
func NewPortInfoMap(namespace, name string, svcPortTupleSet SvcPortTupleSet, namer NetworkEndpointGroupNamer, readinessGate bool) PortInfoMap
func NewPortInfoMapForVMIPNEG ¶ added in v1.9.4
func NewPortInfoMapForVMIPNEG(namespace, name string, namer NetworkEndpointGroupNamer, randomize bool) PortInfoMap
NewPortInfoMapForVMIPNEG creates PortInfoMap with empty port tuple. Since VM_IP NEGs target the node instead of the pod, there is no port info to be stored.
func NewPortInfoMapWithDestinationRule ¶ added in v1.7.0
func NewPortInfoMapWithDestinationRule(namespace, name string, svcPortTupleSet SvcPortTupleSet, namer NetworkEndpointGroupNamer, readinessGate bool, destinationRule *istioV1alpha3.DestinationRule) (PortInfoMap, error)
NewPortInfoMapWithDestinationRule create PortInfoMap based on a gaven DesinationRule. Return error message if the DestinationRule contains duplicated subsets.
func (PortInfoMap) Difference ¶ added in v1.6.0
func (p1 PortInfoMap) Difference(p2 PortInfoMap) PortInfoMap
Difference returns the entries of PortInfoMap which satisfies one of the following 2 conditions: 1. portInfo entry is not the present in p1 2. or the portInfo entry is not the same in p1 and p2.
func (PortInfoMap) Merge ¶ added in v1.6.0
func (p1 PortInfoMap) Merge(p2 PortInfoMap) error
Merge merges p2 into p1 PortInfoMap It assumes the same key (service port) will have the same target port and negName If not, it will throw error If a key in p1 or p2 has readiness gate enabled, the merged port info will also has readiness gate enabled If a key in p1 or p2 has randomize endpoints enabled, the merged port info will also has randomize endpoints enabled. This field is only applicable for VMPrimaryIP NEGs.
func (PortInfoMap) NegsWithReadinessGate ¶ added in v1.6.0
func (p1 PortInfoMap) NegsWithReadinessGate() sets.String
NegsWithReadinessGate returns the NegNames which has readiness gate enabled
func (PortInfoMap) ToPortNegMap ¶ added in v1.6.0
func (p1 PortInfoMap) ToPortNegMap() annotations.PortNegMap
func (PortInfoMap) ToPortSubsetNegMap ¶ added in v1.7.0
func (p1 PortInfoMap) ToPortSubsetNegMap() annotations.PortSubsetNegMap
type PortInfoMapKey ¶ added in v1.7.0
type PortInfoMapKey struct { // ServicePort is the service port ServicePort int32 // Istio:DestinationRule Subset, only used when --enable-csm=true Subset string }
PortInfoMapKey is the Key of PortInfoMap
type SvcPortTuple ¶ added in v1.8.0
type SvcPortTuple struct { // Port is the service port number Port int32 // Name is the service port name Name string // TargetPort is the service target port. // This can be a port number or named port TargetPort string }
SvcPortTuple is the tuple representing one service port
func (SvcPortTuple) Empty ¶ added in v1.9.0
func (t SvcPortTuple) Empty() bool
func (SvcPortTuple) String ¶ added in v1.8.0
func (t SvcPortTuple) String() string
String returns the string representation of SvcPortTuple
type SvcPortTupleSet ¶ added in v1.8.0
type SvcPortTupleSet map[SvcPortTuple]struct{}
SvcPortTupleSet is a set of SvcPortTuple
func NewSvcPortTupleSet ¶ added in v1.8.0
func NewSvcPortTupleSet(tuples ...SvcPortTuple) SvcPortTupleSet
NewSvcPortTupleSet returns SvcPortTupleSet with the input tuples
func (SvcPortTupleSet) Get ¶ added in v1.8.0
func (set SvcPortTupleSet) Get(svcPort int32) (SvcPortTuple, bool)
Get returns the SvcPortTuple with matching svc port if found
func (SvcPortTupleSet) Insert ¶ added in v1.8.0
func (set SvcPortTupleSet) Insert(tuples ...SvcPortTuple)
Insert inserts a SvcPortTuple into SvcPortTupleSet