locker

package module
v0.0.0-...-0319abb Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MIT Imports: 7 Imported by: 0

README

locker

Distributed locker

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

type Locker interface {
	Lock(ctx context.Context) (Releaser, error)
}

Locker is an interface for postgresql advisory locks.

func New

func New(db *sql.DB, key string) (Locker, error)

New returns a Locker client.

type Releaser

type Releaser interface {
	Release(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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