ipam

package
v0.42.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMer

type IPAMer interface {
	AllocateIP(ctx context.Context, prefix metal.Prefix) (string, error)
	AllocateSpecificIP(ctx context.Context, prefix metal.Prefix, specificIP string) (string, error)
	ReleaseIP(ctx context.Context, ip metal.IP) error
	AllocateChildPrefix(ctx context.Context, parentPrefix metal.Prefix, childLength uint8) (*metal.Prefix, error)
	ReleaseChildPrefix(ctx context.Context, childPrefix metal.Prefix) error
	CreatePrefix(ctx context.Context, prefix metal.Prefix) error
	DeletePrefix(ctx context.Context, prefix metal.Prefix) error
	PrefixUsage(ctx context.Context, cidr string) (*metal.NetworkUsage, error)
	PrefixesOverlapping(existingPrefixes metal.Prefixes, newPrefixes metal.Prefixes) error
	// Required for healthcheck
	Check(ctx context.Context) (healthstatus.HealthResult, error)
	ServiceName() string
}

A IPAMer is responsible to allocate a IP for a given purpose On the other hand it should release the IP. Later Implementations should also allocate and release Networks.

func InitTestIpam

func InitTestIpam(t *testing.T) IPAMer

func New

New creates a new IPAM module.

Jump to

Keyboard shortcuts

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