consullock

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

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

func (*Lock) Lock

func (l *Lock) Lock(ctx context.Context) (chan struct{}, error)

func (*Lock) Unlock

func (l *Lock) Unlock(ctx context.Context) error

func (*Lock) WaitForUnlock

func (l *Lock) WaitForUnlock(ctx context.Context) error

type Pool

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

func NewPool

func NewPool(consulAddress string) (Pool, error)

func (Pool) NewLock

func (p Pool) NewLock(lockName string, expiry time.Duration) *Lock

Jump to

Keyboard shortcuts

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