gateway_info

package
v0.0.0-...-75499ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayInfo

type GatewayInfo struct {
	Gateways   sets.Set[string]
	BFDEnabled bool
	// contains filtered or unexported fields
}

func NewGatewayInfo

func NewGatewayInfo(items sets.Set[string], bfdEnabled bool) *GatewayInfo

func (*GatewayInfo) Equal

func (g *GatewayInfo) Equal(g2 *GatewayInfo) bool

Equal compares all GatewayInfo fields, including BFDEnabled and applied

func (*GatewayInfo) Has

func (g *GatewayInfo) Has(ip string) bool

func (GatewayInfo) Len

func (g GatewayInfo) Len() int

func (*GatewayInfo) RemoveIPs

func (g *GatewayInfo) RemoveIPs(g2 *GatewayInfo)

func (*GatewayInfo) SameSpec

func (g *GatewayInfo) SameSpec(g2 *GatewayInfo) bool

SameSpec compares GatewayInfo fields, excluding applied

func (*GatewayInfo) String

func (g *GatewayInfo) String() string

type GatewayInfoList

type GatewayInfoList struct {
	// contains filtered or unexported fields
}

GatewayInfoList stores a list of GatewayInfo with unique ips. never change GatewayInfoList.elems directly, use GatewayInfoList methods instead

func NewGatewayInfoList

func NewGatewayInfoList(elems ...*GatewayInfo) *GatewayInfoList

func (*GatewayInfoList) Delete

func (g *GatewayInfoList) Delete(gws ...*GatewayInfo)

Delete removes gatewayInfos that match for all fields, including applied status

func (*GatewayInfoList) Elems

func (g *GatewayInfoList) Elems() []*GatewayInfo

func (*GatewayInfoList) Equal

func (g *GatewayInfoList) Equal(g2 *GatewayInfoList) bool

Equal compares GatewayInfoList elements to be exactly the same, including applied status, but ignores elements order.

func (*GatewayInfoList) Has

func (g *GatewayInfoList) Has(gw *GatewayInfo) bool

func (*GatewayInfoList) HasWithoutErr

func (g *GatewayInfoList) HasWithoutErr(gw *GatewayInfo) bool

func (*GatewayInfoList) InsertOverwrite

func (g *GatewayInfoList) InsertOverwrite(gws ...*GatewayInfo)

InsertOverwrite should be used to add elements to the GatewayInfoList. The latest added gateway with duplicate ip will cause existing gw ip to be deleted. This way, we always have only 1 GatewayInfo for every ip.

func (*GatewayInfoList) InsertOverwriteFailed

func (g *GatewayInfoList) InsertOverwriteFailed(gws ...*GatewayInfo)

func (*GatewayInfoList) Len

func (g *GatewayInfoList) Len() int

func (*GatewayInfoList) String

func (g *GatewayInfoList) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL