etcd

package
v0.0.0-...-e80bbde Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd

type Etcd struct {
	Endpoints   []string         // etcd 集群列表
	DialTimeout int              // 连接超时时间,单位秒
	Username    string           // 用户名
	Password    string           // 密码
	Client      *clientv3.Client // 使用客户端

}

etcd 属性

func NewEtcd

func NewEtcd(Endpoints []string, timeout int, username, password string) *Etcd

func (*Etcd) Init

func (s *Etcd) Init() (err error)

初始化

func (*Etcd) NewKv

func (s *Etcd) NewKv() clientv3.KV

new etcd kv

func (*Etcd) NewLease

func (s *Etcd) NewLease() clientv3.Lease

new etcd lease

func (*Etcd) NewWatcher

func (s *Etcd) NewWatcher() clientv3.Watcher

new etcd watcher

Jump to

Keyboard shortcuts

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