redis

package
v0.0.0-...-42351fe Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {

	// The master name.
	MasterName string
	// A seed list of host:port addresses of sentinel nodes.
	SentinelAddrs []string

	RedisMaxRetries      int
	RedisMinRetryBackoff time.Duration
	RedisMaxRetryBackoff time.Duration

	// The namespace for the keys, default of WLS-ING:
	// If set, this is what will get prepended to all redis keys
	RedisNamespacePrefix string
	// contains filtered or unexported fields
}

Manager describes the interface into redis

func (*Manager) AddCookie

func (r *Manager) AddCookie(jsession, endpoint string) error

AddCookie publishes the jsessionid cookie to redis for an endpoint

func (*Manager) Clean

func (r *Manager) Clean(endpoints []string) error

Clean cleans up the stale connections that are not in the list passed in.

func (*Manager) GetEndpoint

func (r *Manager) GetEndpoint(jsession string, updateExpire bool) (string, error)

GetEndpoint returns the endpoint (IP Address) for the jsession cookie

func (*Manager) RemoveEndpoint

func (r *Manager) RemoveEndpoint(endpoint string) error

RemoveEndpoint removes the cookie entries for the endpoint when its pod goes away

func (*Manager) Start

func (r *Manager) Start() error

Start starts the redis communication

func (*Manager) Stop

func (r *Manager) Stop() error

Stop ends the redis communication

Jump to

Keyboard shortcuts

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