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 ¶
Click to show internal directories.
Click to hide internal directories.