redigo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisPoolFromURL

func NewRedisPoolFromURL(rawURL string, opts ...OptionFunc) (*redis.Pool, error)

NewRedisPoolFromURL returns a new *redigo/redis.Pool configured for the supplied url. If the url includes a password in the standard form it is used to AUTH against the redis server

func WaitForAvailability

func WaitForAvailability(url string, d time.Duration, f WaitFunc) (bool, error)

WaitForAvailability of the redis server located at the provided url, timeout if the Duration passes before being able to connect

Types

type DialURLFunc added in v0.0.2

type DialURLFunc func(string, ...redis.DialOption) (redis.Conn, error)

DialURLFunc describes the type implemented by redis.DialURL, useful for changing the behavior of a redis Dialer.

type OptionFunc added in v0.0.2

type OptionFunc func(*redisDialer)

OptionFunc sets redisDialer options

func WithDialURLFunc added in v0.0.2

func WithDialURLFunc(df DialURLFunc) OptionFunc

WithDialURLFunc specifies an alternative DialURLFunc to use when dialing via URL.

func WithPasswords added in v0.0.2

func WithPasswords(passes ...string) OptionFunc

WithPasswords specifies additional passwords to try authenticating with when dialing

type WaitFunc

type WaitFunc func(time.Time) error

WaitFunc to be executed occasionally by something that is waiting. Should return an error to cancel the waiting Should also sleep some amount of time to throttle connection attempts

Jump to

Keyboard shortcuts

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