Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_DIAL_TIMEOUT = 3 * time.Second DEFAULT_READ_TIMEOUT = 3 * time.Second DEFAULT_WRITE_TIMEOUT = 3 * time.Second DATA_TTL = 1800 )
View Source
const DEFAULT_LOCK_TTL = 60
View Source
const LEASE_PREFIX = "/etcd4go-lease/#lease/_%s"
View Source
const LOCK_PREFIX = "/etcd4go-lock/#lock/_%s"
Variables ¶
View Source
var EtcdClient = etcdClient{}
View Source
var LockByOther = lockError{"lock by other"}
View Source
var LockError = lockError{"lock error"}
View Source
var NotFoundKeyError = etcdError{"NotFoundKey"}
View Source
var SortMode = sortMode{}
Functions ¶
This section is empty.
Types ¶
type KeepAliveEventListener ¶ added in v1.0.4
type LeaseOpBuild ¶
LeaseOpBuild return clientv3.Op[], string to description of lease, error if raise error
type Lock ¶ added in v1.0.11
type Lock struct {
// contains filtered or unexported fields
}
func (*Lock) Mutex ¶ added in v1.0.11
func (l *Lock) Mutex() *concurrency.Mutex
func (*Lock) Session ¶ added in v1.0.11
func (l *Lock) Session() *concurrency.Session
type SortTarget ¶
type SortTarget clientv3.SortTarget
const ( SortByKey SortTarget = SortTarget(clientv3.SortByKey) SortByVersion SortTarget = SortTarget(clientv3.SortByVersion) SortByCreateRevision SortTarget = SortTarget(clientv3.SortByCreateRevision) SortByModRevision SortTarget = SortTarget(clientv3.SortByModRevision) SortByValue SortTarget = SortTarget(clientv3.SortByValue) )
Click to show internal directories.
Click to hide internal directories.