backend

package
v0.0.0-...-f52ea5f Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBackends = errors.New("no backends")

Functions

This section is empty.

Types

type RedisOptions

type RedisOptions struct {
	Network       string
	Host          string
	Port          int
	SentinelAddrs string
	SentinelName  string
	Password      string
	DB            int
}

func (RedisOptions) Client

func (opts RedisOptions) Client() (*redis.Client, error)

type RoutesBackend

type RoutesBackend interface {
	Healthcheck() error
	Backends(host string) (string, []string, map[int]struct{}, error)
	MarkDead(host string, backend string, backendIdx int, backendLen int, deadTTL int) error
	StartMonitor() error
	StopMonitor()
}

func NewRedisBackend

func NewRedisBackend(readOpts, writeOpts RedisOptions) (RoutesBackend, error)

Jump to

Keyboard shortcuts

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