etcdlocker

package module
v0.0.0-...-2e5b84a Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 7 Imported by: 0

README

etcd_locker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMutexHasLocked = errors.New("muetx has locked")
)

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Printf(fmt string, arg ...interface{})
}

type Mutex

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

func New

func New(key string, endpoints []string, opts ...Option) (*Mutex, error)

func (*Mutex) Lock

func (m *Mutex) Lock() (err error)

func (*Mutex) Unlock

func (m *Mutex) Unlock() error

type Option

type Option func(*Options)

func TTL

func TTL(d time.Duration) Option

type Options

type Options struct {
	TTL time.Duration
}

type StdLogger

type StdLogger struct {
}

func (*StdLogger) Printf

func (*StdLogger) Printf(fmt string, arg ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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