util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExcludedMark = "EXCLUDED"

	AgentSuffixName = "agent"
)

Variables

This section is empty.

Functions

func EnvGetBool

func EnvGetBool(key string, defaultValue bool) bool

func FileExists

func FileExists(filename string) bool

func LoadAllocated added in v0.2.0

func LoadAllocated(allocated map[string]string) (ipAddrList []netip.Addr)

func SafeAgentConcatName added in v0.2.0

func SafeAgentConcatName(name ...string) string

Types

type PoolInfo added in v0.2.0

type PoolInfo struct {
	IPNet           *net.IPNet
	NetworkIPAddr   netip.Addr
	BroadcastIPAddr netip.Addr
	StartIPAddr     netip.Addr
	EndIPAddr       netip.Addr
	ServerIPAddr    netip.Addr
	RouterIPAddr    netip.Addr
}

func LoadPool added in v0.2.0

func LoadPool(ipPool *networkv1.IPPool) (pi PoolInfo, err error)

type VmnetcfgGetter

type VmnetcfgGetter struct {
	VmnetcfgCache ctlnetworkv1.VirtualMachineNetworkConfigCache
}

func (*VmnetcfgGetter) WhoUseIPPool

WhoUseIPPool requires adding network indexer to the vmnetcfg cache before invoking it

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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