helper

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelKeyClusterName is the label key to specify GC name for RouteSet/StaticRoute CR
	LabelKeyClusterName = "clusterName"
	// RealizedStateTimeout is the timeout duration for realized state check
	RealizedStateTimeout = 10 * time.Second
	// RealizedStateSleepTime is the interval between realized state check
	RealizedStateSleepTime = 1 * time.Second
)

Variables

View Source
var (
	ErrGetRouteCR    = errors.New("failed to get Route CR")
	ErrCreateRouteCR = errors.New("failed to create Route CR")
	ErrListRouteCR   = errors.New("failed to list Route CR")
	ErrDeleteRouteCR = errors.New("failed to delete Route CR")
)

A list of possible RouteSet or StaticRoute operation error messages

Functions

func GetRouteName

func GetRouteName(nodeName string, cidr string, clusterName string) string

GetRouteName returns RouteInfo name as <nodeName>-<cidr>-<clusterName> e.g. nodeName-100.96.0.0-24-clusterName

Types

type RouteCR

type RouteCR interface{}

RouteCR defines an interface that is used to represent different kinds of nsx.vmware.com route CR

type RouteCRList

type RouteCRList interface{}

RouteCRList defines an interface that is used to represent different kinds of nsx.vmware.com route CR List

type RouteInfo

type RouteInfo struct {
	Namespace string
	Labels    map[string]string
	Owner     []metav1.OwnerReference
	Name      string // route cr name / node name
	Cidr      string // destination network
	NodeIP    string // next hop / target ip
	RouteName string
}

RouteInfo collects all the information to build a RouteCR

Jump to

Keyboard shortcuts

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