Documentation ¶
Index ¶
- func NewManager(networks []string, nGetter NetworkGetter, sGetter SubnetGetter, ...) (ipam.Manager, error)
- type IPSetGetter
- type Manager
- func (m *Manager) Allocate(networkName string, podInfo types.PodInfo, opts ...types.AllocateOption) (allocatedIPs []*types.IP, err error)
- func (m *Manager) Assign(networkName string, podInfo types.PodInfo, ...) (assignedIPs []*types.IP, err error)
- func (m *Manager) GetNetworkUsage(networkName string) (*types.NetworkUsage, error)
- func (m *Manager) GetSubnetUsage(networkName, subnetName string) (*types.Usage, error)
- func (m *Manager) Refresh(opts ...types.RefreshOption) error
- func (m *Manager) Release(networkName string, releaseSuites []types.SubnetIPSuite) (err error)
- func (m *Manager) Reserve(networkName string, reserveSuites []types.SubnetIPSuite) (err error)
- type NetworkGetter
- type SubnetGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
func NewManager(networks []string, nGetter NetworkGetter, sGetter SubnetGetter, iGetter IPSetGetter) (ipam.Manager, error)
NewManager is a kind of constructor of ipam.Manager
Types ¶
type Manager ¶
type Manager struct { sync.RWMutex NetworkSet types.NetworkSet NetworkGetter NetworkGetter SubnetGetter SubnetGetter IPSetGetter IPSetGetter }
Manager is the build-in IPAM Manager implementation
func (*Manager) Allocate ¶
func (m *Manager) Allocate(networkName string, podInfo types.PodInfo, opts ...types.AllocateOption) (allocatedIPs []*types.IP, err error)
Allocate will allocate some new IP for a specified pod
func (*Manager) Assign ¶
func (m *Manager) Assign(networkName string, podInfo types.PodInfo, assignedSuites []types.SubnetIPSuite, opts ...types.AssignOption) (assignedIPs []*types.IP, err error)
Assign will recouple a specified pod with some allocated IPs
func (*Manager) GetNetworkUsage ¶
func (m *Manager) GetNetworkUsage(networkName string) (*types.NetworkUsage, error)
GetNetworkUsage will return a network usage statistics including different ip family and all subnets
func (*Manager) GetSubnetUsage ¶
GetSubnetUsage will return a usage statistics of a specified subnet of a network
func (*Manager) Refresh ¶
func (m *Manager) Refresh(opts ...types.RefreshOption) error
Refresh will trigger network data update in cache
Click to show internal directories.
Click to hide internal directories.