etcdv3

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "etcdv3"

Variables

This section is empty.

Functions

func List added in v0.0.10

func List() (dt map[string]*Client)

List etcd client list

Types

type Cfg added in v0.0.11

type Cfg struct {
	Endpoints            []string          `json:"endpoints"`
	AutoSyncInterval     time.Duration     `json:"interval"`
	DialTimeout          time.Duration     `json:"timeout"`
	DialKeepAliveTime    time.Duration     `json:"keepalive"`
	DialKeepAliveTimeout time.Duration     `json:"keepalive_timeout"`
	MaxCallSendMsgSize   int               `json:"max_send"`
	MaxCallRecvMsgSize   int               `json:"max_recv"`
	Username             string            `json:"username"`
	Name                 string            `json:"name"`
	Password             string            `json:"password"`
	DialOptions          []grpc.DialOption `json:"-"`
}

func GetDefaultCfg added in v0.0.11

func GetDefaultCfg() Cfg

func (Cfg) ToEtcd added in v0.0.11

func (t Cfg) ToEtcd() (cfg clientv3.Config)

转化为etcd Cfg

type Client

type Client struct {
	*clientv3.Client
}

func Get added in v0.0.10

func Get(names ...string) *Client

Get 获取etcd client

Jump to

Keyboard shortcuts

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