redis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTimeout returns when you couldn't make a TryLock call
	ErrTimeout = errors.New("Timeout reached")

	// ErrCancelled returns when you have cancelled the context of req
	ErrCancelled = errors.New("context cancelled")

	// Default lock timeout
	DefaultTimeout time.Duration = time.Second * 8
	DefaultTicker  time.Duration = time.Second * 7
)

Functions

func NewRedisLocker

func NewRedisLocker(netw, server string, opts ...Option) *redisLocker

Types

type Option

type Option func(*goredislib.Options)

func WithUsernamePassword

func WithUsernamePassword(username, password string) Option

Jump to

Keyboard shortcuts

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