db

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKey

func DeleteKey(key string) error

func GetKey

func GetKey(key string) (string, error)

func GetKeys

func GetKeys(dir string) (client.Nodes, error)

func IsKeyExist

func IsKeyExist(key string) bool

func SetDBAddr

func SetDBAddr(addr string)

func SetKey

func SetKey(key, value string) error

func SetKeyTTL

func SetKeyTTL(key, value string, ttl int) error

func WatchKey

func WatchKey(key string) (client.Watcher, error)

Types

type EtcdMutexLock

type EtcdMutexLock struct {
	Name    string
	Expired int64
}

func GetEtcdMutexLock

func GetEtcdMutexLock(name string, expired int64) *EtcdMutexLock

func (EtcdMutexLock) Lock

func (mutexLock EtcdMutexLock) Lock() error

func (EtcdMutexLock) Release

func (mutexLock EtcdMutexLock) Release() error

Jump to

Keyboard shortcuts

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