redissession

package
v0.0.0-...-8fa2440 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package redissession provides a Redis-based session store.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedVersion = fmt.Errorf("unsupported serialization version")
View Source
var _, Log = xlog.New("web.session.redissession")

Functions

func New

func New(cfg Config) (storage.Store, error)

Create a new redis-backed session store.

Types

type Config

type Config struct {
	// After what period of inactivity should sessions expire?
	//
	// Default: 4 hours.
	Expiry time.Duration

	// Required. Function returning a Redis connection (e.g. from a pool). Will
	// be closed when no longer needed.
	GetConn func() (redis.Conn, error)

	// Prefix to use for keys stored in Redis. It is recommended that this end in
	// "/".
	Prefix string
}

Redis-backed session store configuration.

Jump to

Keyboard shortcuts

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