etcdcli

package
v0.0.0-...-cd4954e Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdClient

type EtcdClient struct {
	clientv3.Client
}

func Init

func Init(config *types.IPAMConfig) (*EtcdClient, error)

Init returns an etcd client from given config

func (*EtcdClient) AllocateIP

func (alloc *EtcdClient) AllocateIP(nameSpace, nsIpPoolNames, podName string) (*current.IPConfig, *types.NSIPPool, error)

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 (alloc *EtcdClient) GetIPFromNSPool(nameSpace, poolName, podName string) (*current.IPConfig, *types.NSIPPool, error)

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

func (alloc *EtcdClient) GetServiceSpecIP(fixed bool, nameSpace, servicePoolName, podName, stsName string) (*net.IP, *types.NSIPPool, error)

func (*EtcdClient) Release

func (etcdClient *EtcdClient) Release(nameSpace, podName string, releaseFixed bool) error

Jump to

Keyboard shortcuts

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