Documentation
¶
Index ¶
- type EtcdClient
- func (alloc *EtcdClient) AllocateIP(nameSpace, nsIpPoolNames, podName string) (*current.IPConfig, *types.NSIPPool, error)
- func (etcdCLient EtcdClient) Close()
- func (client *EtcdClient) CreateIPPool(pool *types.NSIPPool) error
- func (client *EtcdClient) CreateServiceIPPool(serviceIPPool *types.ServiceIPPool) error
- func (client *EtcdClient) Delete(pool *types.NSIPPool) error
- func (client *EtcdClient) DeleteServiceIPPool(namespace string, servicePoolName string) error
- func (client *EtcdClient) GetAllPool() []*types.NSIPPool
- func (alloc *EtcdClient) GetIPFromNSPool(nameSpace, poolName, podName string) (*current.IPConfig, *types.NSIPPool, error)
- func (client *EtcdClient) GetIPPoolByName(nsname, poolName string) *types.NSIPPool
- func (client *EtcdClient) GetNSAllPool(namespace string) []*types.NSIPPool
- func (r *EtcdClient) GetPodList() ([]types.PodNetwork, error)
- func (client *EtcdClient) GetService(namespace, serviceName string) *types.CreateServiceRequest
- func (client *EtcdClient) GetServicePool(namespace string, ServicePoolName string) (*types.ServiceIPPool, error)
- func (alloc *EtcdClient) GetServiceSpecIP(fixed bool, nameSpace, servicePoolName, podName, stsName string) (*net.IP, *types.NSIPPool, error)
- func (etcdClient *EtcdClient) Release(nameSpace, podName string, releaseFixed bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdClient ¶
func Init ¶
func Init(config *types.IPAMConfig) (*EtcdClient, error)
Init returns an etcd client from given config
func (*EtcdClient) AllocateIP ¶
func (EtcdClient) Close ¶
func (etcdCLient EtcdClient) Close()
Close ends the connection between etcd client and etcd
func (*EtcdClient) CreateIPPool ¶
func (client *EtcdClient) CreateIPPool(pool *types.NSIPPool) error
func (*EtcdClient) CreateServiceIPPool ¶
func (client *EtcdClient) CreateServiceIPPool(serviceIPPool *types.ServiceIPPool) error
CreateServiceIPPool writes a new service IPPool into etcd
func (*EtcdClient) Delete ¶
func (client *EtcdClient) Delete(pool *types.NSIPPool) error
Delete removes the given ns IPPool's record in etcd
func (*EtcdClient) DeleteServiceIPPool ¶
func (client *EtcdClient) DeleteServiceIPPool(namespace string, servicePoolName string) error
DeleteServiceIPPool removes the given service IPPool's record in etcd by it's name and namespace
func (*EtcdClient) GetAllPool ¶
func (client *EtcdClient) GetAllPool() []*types.NSIPPool
GetAllPool calls GetList to get all ns IPPools
func (*EtcdClient) GetIPFromNSPool ¶
func (*EtcdClient) GetIPPoolByName ¶
func (client *EtcdClient) GetIPPoolByName(nsname, poolName string) *types.NSIPPool
GetIPPoolByName calls GetKV to get ns IPPool info from given namespace name and IPPool name
func (*EtcdClient) GetNSAllPool ¶
func (client *EtcdClient) GetNSAllPool(namespace string) []*types.NSIPPool
GetNSAllPool calls GetList to get all nsIPPools in the given namespace
func (*EtcdClient) GetPodList ¶
func (r *EtcdClient) GetPodList() ([]types.PodNetwork, error)
func (*EtcdClient) GetService ¶
func (client *EtcdClient) GetService(namespace, serviceName string) *types.CreateServiceRequest
func (*EtcdClient) GetServicePool ¶
func (client *EtcdClient) GetServicePool(namespace string, ServicePoolName string) (*types.ServiceIPPool, error)
GetServicePool calls GetKV to get service IPPool from the given namespace and service IPPool name
func (*EtcdClient) GetServiceSpecIP ¶
Click to show internal directories.
Click to hide internal directories.