locking

package
v0.4.16-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: ISC Imports: 4 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 {
	Timestamp time.Time
	Hostname  string
	Username  string
	MachineID string
	ProcessID int
	Exclusive bool
}

func New

func New(hostname string, username string, machineID string, processID int, exclusive bool) *Lock

func NewFromBytes

func NewFromBytes(serialized []byte) (*Lock, error)

func (*Lock) Expired

func (lock *Lock) Expired(ttl time.Duration) bool

func (*Lock) Serialize

func (lock *Lock) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

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