Help us shape the future of Go! Take the 2026 Go Developer Survey

locker

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLockerNotExists = errors.NewPublic("the locker does not exists")
	ErrLocked          = errors.NewPublic("tha locker to be locked")
)

Functions

This section is empty.

Types

type Locker

type Locker struct {
	RDb *redis.Client
}

func New

func New(rdb *redis.Client) *Locker

func (*Locker) Delete

func (x *Locker) Delete(ctx context.Context, name string) int64

func (*Locker) Key

func (x *Locker) Key(name string) string

func (*Locker) Update

func (x *Locker) Update(ctx context.Context, name string, ttl time.Duration) int64

func (*Locker) Verify

func (x *Locker) Verify(ctx context.Context, name string, max int64) (err error)

Jump to

Keyboard shortcuts

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