etcd

package
v1.4.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultLockTTL    = 60
	DefaultRetryTimes = 3
	RootPath          = "/cse/etcdsync"

	OperationGlobalLock = "GLOBAL_LOCK"
)

Variables

View Source
var (
	IsDebug bool
)

Functions

This section is empty.

Types

type DLock

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

func (*DLock) ID

func (m *DLock) ID() string

func (*DLock) Lock

func (m *DLock) Lock(wait bool) (err error)

func (*DLock) Unlock

func (m *DLock) Unlock() (err error)

type DataSource

type DataSource struct{}

func NewDataSource

func NewDataSource() *DataSource

func (*DataSource) NewDLock

func (ds *DataSource) NewDLock(key string, ttl int64, wait bool) (lock.DLock, error)

Jump to

Keyboard shortcuts

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