globalnet

package
v0.0.0-...-630eec3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateGlobalCIDR

func AllocateGlobalCIDR(globalnetInfo *GlobalnetInfo) (string, error)

func AssignGlobalnetIPs

func AssignGlobalnetIPs(globalnetInfo *GlobalnetInfo, netconfig Config) (string, error)

func CheckOverlappingCidrs

func CheckOverlappingCidrs(globalnetInfo *GlobalnetInfo, netconfig Config) error

func GetValidClusterSize

func GetValidClusterSize(cidrRange string, clusterSize uint) (uint, error)

func IsValidCIDR

func IsValidCIDR(cidr string) error

func LastIP

func LastIP(network *net.IPNet) uint

func ValidateExistingGlobalNetworks

func ValidateExistingGlobalNetworks(reader client.Reader, namespace string) error

func ValidateGlobalnetConfiguration

func ValidateGlobalnetConfiguration(globalnetInfo *GlobalnetInfo, netconfig Config) (string, error)

Types

type CIDR

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

func NewCIDR

func NewCIDR(cidr string) (CIDR, error)

type Config

type Config struct {
	ClusterCIDR             string
	ClusterID               string
	GlobalnetCIDR           string
	ServiceCIDR             string
	GlobalnetClusterSize    uint
	ClusterCIDRAutoDetected bool
	ServiceCIDRAutoDetected bool
}

type GlobalCIDR

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

type GlobalNetwork

type GlobalNetwork struct {
	GlobalCIDRs []string
	ClusterID   string
}

type GlobalnetInfo

type GlobalnetInfo struct {
	GlobalnetEnabled     bool
	GlobalnetCidrRange   string
	GlobalnetClusterSize uint
	GlobalCidrInfo       map[string]*GlobalNetwork
}

func GetGlobalNetworks

func GetGlobalNetworks(reader client.Reader, brokerNamespace string) (*GlobalnetInfo, *v1.ConfigMap, error)

Jump to

Keyboard shortcuts

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