lib

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: BSD-3-Clause Imports: 2 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 {
	Identifier string        `json:"identifier"`
	Locked     bool          `json:"is_locked"`
	Expiry     time.Duration `json:"expiry"`
}

Lock provides a nice wrapper for a generic lock type

This can be passed to any distributed locking service

func NewLock

func NewLock(id string) (*Lock, error)
NewLock:

Provides a default wrapper for a lock struct.

Jump to

Keyboard shortcuts

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