ipam

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ipam

type Ipam struct {
	// contains filtered or unexported fields
}

func NewIpam

func NewIpam() *Ipam

func (*Ipam) AllocateIP

func (ipam *Ipam) AllocateIP(subnet string) (string, error)

func (*Ipam) AllocateSubnet

func (ipam *Ipam) AllocateSubnet(subnetPool string, prefixLength int) (string, error)

func (*Ipam) ReleaseIP

func (ipam *Ipam) ReleaseIP(ip string) error

func (*Ipam) ReleaseSubnet

func (ipam *Ipam) ReleaseSubnet(subnet string) error

type IpamClient

type IpamClient struct {
	// contains filtered or unexported fields
}

func NewIpamClient

func NewIpamClient(ipamServiceIPPort string) (*IpamClient, error)

func (*IpamClient) AllocateSubnet

func (ic *IpamClient) AllocateSubnet(subnetPool string, prefixLength int) (string, error)

type IpamService

type IpamService struct {
	Listener net.Listener
	Server   *grpc.Server
	Port     int
	// contains filtered or unexported fields
}

func NewIpamService

func NewIpamService(port int) (*IpamService, error)

NewIpam -

func (*IpamService) Allocate

func (is *IpamService) Allocate(ctx context.Context, subnetRequest *ipamAPI.SubnetRequest) (*ipamAPI.Subnet, error)

Allocate -

func (*IpamService) Release

func (is *IpamService) Release(ctx context.Context, subnetRelease *ipamAPI.SubnetRelease) (*empty.Empty, error)

Release -

func (*IpamService) Start

func (is *IpamService) Start()

Start -

Jump to

Keyboard shortcuts

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