librarian

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace                = metav1.NamespaceDefault
	CatConns                 = "connections"
	CatVPCs                  = "vpcs"
	CatSwitchPrefix          = "switch."
	CatRedGroupPrefix        = "redundancy."
	VPCVNIOffset             = 100
	VPCVNIMax                = (16_777_215 - VPCVNIOffset) / VPCVNIOffset * VPCVNIOffset
	PortChannelMin           = 1
	PortChannelMax           = 249
	LoWorkaroundReqPrefixVPC = "vpc@"
	LoWorkaroundReqPrefixExt = "ext@"
)

Variables

This section is empty.

Functions

func LoWReqForExt

func LoWReqForExt(extPeeringName string) string

func LoWReqForVPC

func LoWReqForVPC(vpcPeeringName string) string

Types

type Allocator

type Allocator[Value comparable] struct {
	Values Values[Value]
}

func (*Allocator[Value]) Allocate

func (a *Allocator[Value]) Allocate(known map[string]Value, updates map[string]bool) (map[string]Value, error)

type BalancedValues

type BalancedValues[Value comparable] struct {
	// contains filtered or unexported fields
}

func NewBalancedValues

func NewBalancedValues[Value comparable](vals []Value) *BalancedValues[Value]

func (*BalancedValues[Value]) Add

func (v *BalancedValues[Value]) Add(val Value) bool

func (*BalancedValues[Value]) Next

func (v *BalancedValues[Value]) Next() (Value, error)

type Manager

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

func NewManager

func NewManager(cfg *meta.FabricConfig) *Manager

func (*Manager) CatalogForRedundancyGroup

func (m *Manager) CatalogForRedundancyGroup(ctx context.Context, kube client.Client, ret *agentapi.CatalogSpec, swName string, redundancy wiringapi.SwitchRedundancy, vpcs, portChanConns, idConns map[string]bool) error

func (*Manager) CatalogForSwitch

func (m *Manager) CatalogForSwitch(ctx context.Context, kube client.Client, ret *agentapi.CatalogSpec, swName string, loWorkaroundLinks []string, loWorkaroundReqs, externals, subnets map[string]bool) error

func (*Manager) UpdateConnections

func (m *Manager) UpdateConnections(ctx context.Context, kube client.Client) error

func (*Manager) UpdateVPCs

func (m *Manager) UpdateVPCs(ctx context.Context, kube client.Client) error

type NextFreeValueFromRanges

type NextFreeValueFromRanges[Value constraints.Unsigned] struct {
	// contains filtered or unexported fields
}

func NewNextFreeValueFromRanges

func NewNextFreeValueFromRanges[Value constraints.Unsigned](ranges [][2]Value, inc Value) *NextFreeValueFromRanges[Value]

func NewNextFreeValueFromVLANRanges

func NewNextFreeValueFromVLANRanges(ranges []meta.VLANRange) *NextFreeValueFromRanges[uint16]

func (*NextFreeValueFromRanges[Value]) Add

func (v *NextFreeValueFromRanges[Value]) Add(val Value) bool

func (*NextFreeValueFromRanges[Value]) Next

func (v *NextFreeValueFromRanges[Value]) Next() (Value, error)

type Values

type Values[Value comparable] interface {
	Add(Value) bool
	Next() (Value, error)
}

Jump to

Keyboard shortcuts

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