lock

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: MIT Imports: 1 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 interface {
	Init(...Option)
	Lock(key string, ttl ...time.Duration) error
	Check(key string) (bool, error)
	Unlock(key string) error
	TTL(key string) (int64, error)
}

type Option

type Option func(*Options)

func WithLockTime

func WithLockTime(lockTime time.Duration) Option

type Options

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

Jump to

Keyboard shortcuts

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