redis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 5 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")

	// ErrMissingInfo returns when you have and empty Namespace or Object ID
	ErrMissingInfo = errors.New("Obj is missing information to make that lock")
)

Functions

func NewLocker

func NewLocker(lockerConfig config.Locker) (*locker, error)

NewLocker return new redis based lock

Types

type Pool

type Pool interface {
	Get() redis.Conn
	Close() error
}

Pool is an interface over the redis.Pool struct to make mockable

Jump to

Keyboard shortcuts

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