etcdv3

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "etcdv3"

Variables

This section is empty.

Functions

func Delete

func Delete(name string)

Delete 删除etcd client

Types

type Cfg

type Cfg struct {
	Endpoints            []string          `json:"endpoints"`
	AutoSyncInterval     time.Duration     `json:"auto_sync_interval"`
	DialTimeout          time.Duration     `json:"dial_timeout"`
	DialKeepAliveTime    time.Duration     `json:"dial_keep_alive_time"`
	DialKeepAliveTimeout time.Duration     `json:"dial_keep_alive_timeout"`
	MaxCallSendMsgSize   int               `json:"max_send_size"`
	MaxCallRecvMsgSize   int               `json:"max_recv_size"`
	Username             string            `json:"username"`
	Name                 string            `json:"name"`
	Password             string            `json:"password"`
	RejectOldCluster     bool              `json:"reject_old_cluster"`
	PermitWithoutStream  bool              `json:"permit_without_stream"`
	DialOptions          []grpc.DialOption `json:"-"`
	// contains filtered or unexported fields
}

func GetDefaultCfg

func GetDefaultCfg() *Cfg

func (Cfg) Build

func (t Cfg) Build() (c *clientv3.Client)

type Client

type Client struct {
	*clientv3.Client
}

func Get

func Get(names ...string) *Client

Get 获取etcd client

func (*Client) Kind

func (c *Client) Kind() string

func (*Client) UpdateResObj

func (c *Client) UpdateResObj(val interface{})

Jump to

Keyboard shortcuts

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