ippool

package
v0.0.0-...-3e93e3d Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPPoolClient

type IPPoolClient struct {
	Cli *clientv3.Client
}

IPPoolClient controls all IPPools' creation and deletion in etcd

func NewIPPoolClient

func NewIPPoolClient(etcdClient *clientv3.Client) *IPPoolClient

NewIPPoolClient returns a new IPPoolClient from the given config

func (*IPPoolClient) CreateIPPool

func (client *IPPoolClient) CreateIPPool(pool *hcipamTypes.NSIPPool) error

CreateIPPool calls PutKV to create ns IPPool in etcd

func (*IPPoolClient) CreateServiceIPPool

func (client *IPPoolClient) CreateServiceIPPool(serviceIPPool *hcipamTypes.ServiceIPPool) error

CreateServiceIPPool writes a new service IPPool into etcd

func (*IPPoolClient) Delete

func (client *IPPoolClient) Delete(pool *hcipamTypes.NSIPPool) error

Delete removes the given ns IPPool's record in etcd

func (*IPPoolClient) DeleteServiceIPPool

func (client *IPPoolClient) DeleteServiceIPPool(namespace string, servicePoolName string) error

DeleteServiceIPPool removes the given service IPPool's record in etcd by it's name and namespace

func (*IPPoolClient) GetAllPool

func (client *IPPoolClient) GetAllPool() []*hcipamTypes.NSIPPool

GetAllPool calls GetList to get all ns IPPools

func (*IPPoolClient) GetIPPoolByName

func (client *IPPoolClient) GetIPPoolByName(nsname, poolName string) *hcipamTypes.NSIPPool

GetIPPoolByName calls GetKV to get ns IPPool info from given namespace name and IPPool name

func (*IPPoolClient) GetNSAllPool

func (client *IPPoolClient) GetNSAllPool(namespace string) []*hcipamTypes.NSIPPool

GetNSAllPool calls GetList to get all nsIPPools in the given namespace

func (*IPPoolClient) GetServicePool

func (client *IPPoolClient) GetServicePool(namespace string, ServicePoolName string) (*hcipamTypes.ServiceIPPool, error)

GetServicePool calls GetKV to get service IPPool from the given namespace and service IPPool name

Jump to

Keyboard shortcuts

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