Documentation ¶
Index ¶
- Variables
- type AutoAssignArgs
- type GetUtilizationArgs
- type IPAMClient
- func (c IPAMClient) AutoAssign(args AutoAssignArgs) (*current.Result, error)
- func (c IPAMClient) DeleteBlock(b *v1alpha1.IPAMBlock) error
- func (c IPAMClient) GetUtilization(args GetUtilizationArgs) ([]*PoolUtilization, error)
- func (c IPAMClient) ListBlocks(pool string) ([]v1alpha1.IPAMBlock, error)
- func (c IPAMClient) ReleaseByHandle(handleID string) error
- type Interface
- type PoolAccessorInterface
- type PoolUtilization
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AutoAssignArgs ¶
type AutoAssignArgs struct { HandleID string // A key/value mapping of metadata to store with the allocations. Attrs map[string]string Pool string }
AutoAssignArgs defines the set of arguments for assigning one or more IP addresses.
type GetUtilizationArgs ¶
type GetUtilizationArgs struct { // If specified, the pools whose utilization should be reported. Each string here // can be a pool name or CIDR. If not specified, this defaults to all pools. Pools []string }
GetUtilizationArgs defines the set of arguments for requesting IP utilization.
type IPAMClient ¶
type IPAMClient struct {
// contains filtered or unexported fields
}
IPAMClient implements Interface
func NewIPAMClient ¶
func NewIPAMClient(client kubesphere.Interface, typeStr string) IPAMClient
NewIPAMClient returns a new IPAMClient, which implements Interface.
func (IPAMClient) AutoAssign ¶
func (c IPAMClient) AutoAssign(args AutoAssignArgs) (*current.Result, error)
AutoAssign automatically assigns one or more IP addresses as specified by the provided AutoAssignArgs. AutoAssign returns the list of the assigned IPv4 addresses, and the list of the assigned IPv6 addresses.
In case of error, returns the IPs allocated so far along with the error.
func (IPAMClient) DeleteBlock ¶
func (c IPAMClient) DeleteBlock(b *v1alpha1.IPAMBlock) error
DeleteBlock deletes the given block.
func (IPAMClient) GetUtilization ¶
func (c IPAMClient) GetUtilization(args GetUtilizationArgs) ([]*PoolUtilization, error)
GetUtilization returns IP utilization info for the specified pools, or for all pools.
func (IPAMClient) ListBlocks ¶
func (c IPAMClient) ListBlocks(pool string) ([]v1alpha1.IPAMBlock, error)
func (IPAMClient) ReleaseByHandle ¶
func (c IPAMClient) ReleaseByHandle(handleID string) error
ReleaseByHandle releases all IP addresses that have been assigned using the provided handle.
type Interface ¶
type Interface interface { // AutoAssign automatically assigns one or more IP addresses as specified by the // provided AutoAssignArgs. AutoAssign returns the list of the assigned IPv4 addresses, // and the list of the assigned IPv6 addresses in IPNet format. // The returned IPNet represents the allocation block from which the IP was allocated, // which is useful for dataplanes that need to know the subnet (such as Windows). // // In case of error, returns the IPs allocated so far along with the error. AutoAssign(args AutoAssignArgs) (*current.Result, error) // ReleaseByHandle releases all IP addresses that have been assigned // using the provided handle. Returns an error if no addresses // are assigned with the given handle. ReleaseByHandle(handleID string) error GetUtilization(args GetUtilizationArgs) ([]*PoolUtilization, error) }
ipam.Interface has methods to perform IP address management.
type PoolAccessorInterface ¶
type PoolAccessorInterface interface {
// contains filtered or unexported methods
}
Interface used to access the enabled IPPools.