lock

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 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 IRedisson

type IRedisson interface {
}

type Lock

type Lock interface {
	Lock(key string, ttl time.Duration) (bool, error)
	Unlock(key string) 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
}

type RedisLock

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

func (*RedisLock) Check

func (rl *RedisLock) Check(key string) (bool, error)

func (*RedisLock) Lock

func (rl *RedisLock) Lock(key string, ttl time.Duration) (bool, error)

func (*RedisLock) Provide

func (rl *RedisLock) Provide(context.Context) interface{}

func (*RedisLock) Unlock

func (rl *RedisLock) Unlock(key string) error

type Redisson

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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