Documentation
¶
Index ¶
- func AllocateIP(ctx context.Context, cli *clientv3.Client, ipHeap *IPHeap, publicKey string) (net.IP, error)
- func LoadAvailableIPs(ctx context.Context, cli *clientv3.Client) ([]net.IP, error)
- func ReleaseIP(ctx context.Context, cli *clientv3.Client, ip net.IP) error
- func RemoveIPFromHeap(ipHeap *IPHeap, ip net.IP)
- func WatchAvailableIPs(ctx context.Context, cli *clientv3.Client, ipHeap *IPHeap)
- type IPAllocator
- type IPHeap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateIP ¶
func LoadAvailableIPs ¶
func RemoveIPFromHeap ¶
Types ¶
type IPAllocator ¶
type IPAllocator struct {
// contains filtered or unexported fields
}
func NewIPAllocator ¶
func NewIPAllocator(cidr string) (*IPAllocator, error)
func (*IPAllocator) Allocate ¶
func (a *IPAllocator) Allocate() (string, error)
Click to show internal directories.
Click to hide internal directories.