v2

package
v1.9.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownNode = errors.New("datastore: unknown Node")

	UnknownSubnetError = errors.New("datastore: unknown subnet")

	ErrUnknownIP = errors.New("datastore: unknown IP")

	ErrEmptyNode = errors.New("datastore: empty Node")

	EmptySubnetError = errors.New("datastore: empty subnet")

	ErrNoAvailableIPAddressInDataStore = errors.New("no available ip address in datastore")

	NoAvailableIPAddressInSubnetBucketError = errors.New("no available ip address in subnet bucket")
)

Functions

This section is empty.

Types

type AddressInfo

type AddressInfo struct {
	Address        string
	Assigned       bool
	SubnetID       string
	UnassignedTime time.Time
}

type DataStore

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

func NewDataStore

func NewDataStore() *DataStore

func (*DataStore) AddNodeToStore

func (ds *DataStore) AddNodeToStore(node, instanceID string) error

func (*DataStore) AddPrivateIPToStore

func (ds *DataStore) AddPrivateIPToStore(node, subnetID, ipAddress string, assigned bool) error

func (*DataStore) AllocatePodPrivateIP

func (ds *DataStore) AllocatePodPrivateIP(node string) (string, string, error)

func (*DataStore) AllocatePodPrivateIPBySubnet

func (ds *DataStore) AllocatePodPrivateIPBySubnet(node, subnetID string) (string, string, error)

func (*DataStore) DeleteNodeFromStore

func (ds *DataStore) DeleteNodeFromStore(node string) error

func (*DataStore) DeletePrivateIPFromStore

func (ds *DataStore) DeletePrivateIPFromStore(node, subnetID, ipAddress string) error

func (*DataStore) GetNodeStats

func (ds *DataStore) GetNodeStats(node string) (int, int, error)

func (*DataStore) GetSubnetBucketStats

func (ds *DataStore) GetSubnetBucketStats(node, subnetID string) (int, int, error)

func (*DataStore) GetUnassignedPrivateIPByNode

func (ds *DataStore) GetUnassignedPrivateIPByNode(node string) ([]string, error)

func (*DataStore) ListNodes

func (ds *DataStore) ListNodes() []string

func (*DataStore) NodeExistsInStore

func (ds *DataStore) NodeExistsInStore(node string) bool

func (*DataStore) ReleasePodPrivateIP

func (ds *DataStore) ReleasePodPrivateIP(node, subnetID, ip string) error

type Instance

type Instance struct {
	ID string
	// contains filtered or unexported fields
}

type SubnetBucket

type SubnetBucket struct {
	ID            string
	IPv4Addresses map[string]*AddressInfo
	// contains filtered or unexported fields
}

func (*SubnetBucket) AssignedIPv4Addresses

func (sb *SubnetBucket) AssignedIPv4Addresses() int

func (*SubnetBucket) TotalIPv4Addresses

func (sb *SubnetBucket) TotalIPv4Addresses() int

Jump to

Keyboard shortcuts

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