Documentation ¶
Index ¶
- Variables
- type Provider
- func (rp *Provider) Count() int
- func (rp *Provider) Destory(sid string) error
- func (rp *Provider) Exist(sid string) bool
- func (rp *Provider) GC()
- func (rp *Provider) Init(maxLifetime int64, savePath string) error
- func (rp *Provider) Read(sid string) (makross.RawStore, error)
- func (rp *Provider) Regenerate(oldsid, sid string) (makross.RawStore, error)
- type SessionStore
- func (rs *SessionStore) Delete(key interface{}) error
- func (rs *SessionStore) Flush() error
- func (rs *SessionStore) Get(key interface{}) interface{}
- func (rs *SessionStore) ID() string
- func (rs *SessionStore) Release(ctx *makross.Context) (err error)
- func (rs *SessionStore) Set(key, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxPoolSize = 100
MaxPoolSize redis max pool size
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider redis session provider
func (*Provider) Init ¶
Init init redis session savepath like redis server addr,pool size,password,dbnum e.g. 127.0.0.1:6379,100,astaxie,0
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore redis session store
func (*SessionStore) Delete ¶
func (rs *SessionStore) Delete(key interface{}) error
Delete value in redis session
func (*SessionStore) Flush ¶
func (rs *SessionStore) Flush() error
Flush clear all values in redis session
func (*SessionStore) Get ¶
func (rs *SessionStore) Get(key interface{}) interface{}
Get value in redis session
func (*SessionStore) Release ¶
func (rs *SessionStore) Release(ctx *makross.Context) (err error)
SessionRelease save session values to redis
func (*SessionStore) Set ¶
func (rs *SessionStore) Set(key, value interface{}) error
Set value in redis session
Click to show internal directories.
Click to hide internal directories.