etcdlock

package
v0.0.0-...-1a62c48 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

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

Mutex is etcdv3 lock

func New

func New(cli *clientv3.Client, key string, ttl int) (*Mutex, error)

New new a lock

func (*Mutex) Lock

func (m *Mutex) Lock(ctx context.Context) error

Lock get locked

func (*Mutex) Unlock

func (m *Mutex) Unlock(ctx context.Context) error

Unlock unlock

Jump to

Keyboard shortcuts

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