redis

package
v1.8.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StandaloneRedisLock

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

Standalone Redis lock store.Any fail-over related features are not supported,such as Sentinel and Redis Cluster.

func NewStandaloneRedisLock

func NewStandaloneRedisLock(logger logger.Logger) *StandaloneRedisLock

NewStandaloneRedisLock returns a new standalone redis lock. Do not use this lock with a redis cluster, which might lead to unexpected lock loss.

func (*StandaloneRedisLock) Close

func (r *StandaloneRedisLock) Close() error

Close shuts down the client's redis connections.

func (*StandaloneRedisLock) InitLockStore

func (r *StandaloneRedisLock) InitLockStore(metadata lock.Metadata) error

Init StandaloneRedisLock.

func (*StandaloneRedisLock) TryLock

Try to acquire a redis lock.

func (*StandaloneRedisLock) Unlock

Try to release a redis lock.

Jump to

Keyboard shortcuts

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