netservice

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetNetService(zkHost []string) error                   //Get Netservice ip address from zookeeper
	RegisterPool(pool *types.NetPool) error                //register ip pool info to netservice
	UpdatePool(pool *types.NetPool) error                  //update info for pool
	GetPool(cluster, net string) ([]*types.NetPool, error) //Get pool info from netservice
	DeletePool(cluster, net string) error
	ListAllPool() ([]*types.NetPool, error)
	ListAllPoolWithCluster(cluster string) ([]*types.NetPool, error)
	RegisterHost(host *types.HostInfo) error //register host info attaching to ip pool in netservice
	DeleteHost(host string, ips []string) error
	GetHostInfo(host string, timeout int) (*types.HostInfo, error)                   //Get host info by host ip address
	LeaseIPAddr(lease *types.IPLease, timeout int) (*types.IPInfo, error)            //lease ip address from Netservice by containerId/Host/ipaddress(if needed)
	ReleaseIPAddr(release *types.IPRelease, ipInfo *types.IPInfo, timeout int) error // release ip address by containerId & host
	UpdateIPInstance(inst *types.IPInst) error
	TransferIPAttr(input *types.TranIPAttrInput) error
}

Client define http client interface for bcs-ipam

func NewClient

func NewClient() (Client, error)

NewClient create new client with zookeeper

func NewClientWithTLS

func NewClientWithTLS(conf *tls.Config) (Client, error)

NewClientWithTLS create tls client with tls

func NewTLSClient

func NewTLSClient(ca string, key string, crt string, passwd string) (Client, error)

NewTLSClient create tls client with root CA, private key, public key and password

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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