etcd

package
v0.0.0-...-50e54af Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcd

func NewEtcd(c *Conf) *clientv3.Client

Types

type Conf

type Conf struct {
	Addr        []string
	DialTimeout int
}

type EtcdLock

type EtcdLock struct {
	// contains filtered or unexported fields
}

func NewEtcdLock

func NewEtcdLock(conn *clientv3.Client, key string, timeout int64) *EtcdLock

func (*EtcdLock) GetLockKey

func (lock *EtcdLock) GetLockKey() string

func (*EtcdLock) TryLock

func (lock *EtcdLock) TryLock() error

func (*EtcdLock) UnLock

func (lock *EtcdLock) UnLock() error

Jump to

Keyboard shortcuts

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