locker

package module
v0.0.0-...-b94bbaf Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 2 Imported by: 0

README

locker

simple go locking module that uses consul

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConsulAddress string
	Key           string
	Value         string
}

type Locker

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

func NewLocker

func NewLocker(c *Config) (*Locker, error)

func (*Locker) Lock

func (l *Locker) Lock(abortCh <-chan struct{}) (<-chan struct{}, error)

func (*Locker) Unlock

func (l *Locker) Unlock() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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