session

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAX_POOL_SIZE = 100

redis max pool size

Functions

This section is empty.

Types

type RedisProvider

type RedisProvider struct {
	// contains filtered or unexported fields
}

redis session provider

func (*RedisProvider) SessionAll

func (rp *RedisProvider) SessionAll() int

@todo

func (*RedisProvider) SessionDestroy

func (rp *RedisProvider) SessionDestroy(sid string) error

delete redis session by id

func (*RedisProvider) SessionExist

func (rp *RedisProvider) SessionExist(sid string) bool

check redis session exist by sid

func (*RedisProvider) SessionGC

func (rp *RedisProvider) SessionGC()

Impelment method, no used.

func (*RedisProvider) SessionInit

func (rp *RedisProvider) SessionInit(maxlifetime int64, savePath string) error

init redis session savepath like redis server addr,pool size,password e.g. 127.0.0.1:6379,100,astaxie

func (*RedisProvider) SessionRead

func (rp *RedisProvider) SessionRead(sid string) (session.SessionStore, error)

read redis session by sid

func (*RedisProvider) SessionRegenerate

func (rp *RedisProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)

generate new sid for redis session

type RedisSessionStore

type RedisSessionStore struct {
	// contains filtered or unexported fields
}

redis session store

func (*RedisSessionStore) Delete

func (rs *RedisSessionStore) Delete(key interface{}) error

delete value in redis session

func (*RedisSessionStore) Flush

func (rs *RedisSessionStore) Flush() error

clear all values in redis session

func (*RedisSessionStore) Get

func (rs *RedisSessionStore) Get(key interface{}) interface{}

get value in redis session

func (*RedisSessionStore) SessionID

func (rs *RedisSessionStore) SessionID() string

get redis session id

func (*RedisSessionStore) SessionRelease

func (rs *RedisSessionStore) SessionRelease(w http.ResponseWriter)

save session values to redis

func (*RedisSessionStore) Set

func (rs *RedisSessionStore) Set(key, value interface{}) error

set value in redis session

Jump to

Keyboard shortcuts

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