Documentation ¶
Index ¶
- type IPPoolClient
- func (client *IPPoolClient) CreateIPPool(pool *hcipamTypes.NSIPPool) error
- func (client *IPPoolClient) CreateServiceIPPool(serviceIPPool *hcipamTypes.ServiceIPPool) error
- func (client *IPPoolClient) Delete(pool *hcipamTypes.NSIPPool) error
- func (client *IPPoolClient) DeleteServiceIPPool(namespace string, servicePoolName string) error
- func (client *IPPoolClient) GetAllPool() []*hcipamTypes.NSIPPool
- func (client *IPPoolClient) GetIPPoolByName(nsname, poolName string) *hcipamTypes.NSIPPool
- func (client *IPPoolClient) GetNSAllPool(namespace string) []*hcipamTypes.NSIPPool
- func (client *IPPoolClient) GetServicePool(namespace string, ServicePoolName string) (*hcipamTypes.ServiceIPPool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPPoolClient ¶
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