mutex

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 4 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 Distributed lock encapsulating etcd

func New

func New(key string, opts ...Option) (m *Mutex, err error)

New returns a new *Mutex

func (*Mutex) Lock

func (m *Mutex) Lock() (err error)

Lock lock

func (*Mutex) Unlock

func (m *Mutex) Unlock() (err error)

Unlock unlock

type Option

type Option func(*Mutex)

func WithTimeout

func WithTimeout(t time.Duration) Option

Jump to

Keyboard shortcuts

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