redis

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initer

func Initer() session.Initer

Initer returns the session.Initer for the Redis session store.

Types

type Config

type Config struct {
	// Client is the Redis Client connection. If not set, a new client will be
	// created based on Options.
	Client *redis.Client
	// Options is the settings to set up Redis client connection.
	Options *Options
	// KeyPrefix is the prefix to use for keys in Redis. Default is "session:".
	KeyPrefix string
	// Lifetime is the duration to have no access to a session before being
	// recycled. Default is 3600 seconds.
	Lifetime time.Duration
	// Encoder is the encoder to encode session data. Default is session.GobEncoder.
	Encoder session.Encoder
	// Decoder is the decoder to decode session data. Default is session.GobDecoder.
	Decoder session.Decoder
}

Config contains options for the Redis session store.

type Options

type Options = redis.Options

Options keeps the settings to set up Redis client connection.

Jump to

Keyboard shortcuts

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