Documentation ¶
Index ¶
- Constants
- type ProviderRedis
- func (pdr *ProviderRedis) SessionAll() ([]string, error)
- func (pdr *ProviderRedis) SessionDestroy(sid string) error
- func (pdr *ProviderRedis) SessionExist(sid string) bool
- func (pdr *ProviderRedis) SessionGC()
- func (pdr *ProviderRedis) SessionInit(lifetime int64, savePath string) error
- func (pdr *ProviderRedis) SessionNew(sid string) (session.Store, error)
- func (pdr *ProviderRedis) SessionRead(sid string) (session.Store, error)
- func (pdr *ProviderRedis) SessionRegenerate(oldSid, sid string) (session.Store, error)
- type SessionStoreRedis
- func (st *SessionStoreRedis) Delete(key interface{}) error
- func (st *SessionStoreRedis) Flush() error
- func (st *SessionStoreRedis) Get(key interface{}) interface{}
- func (st *SessionStoreRedis) SessionID() string
- func (st *SessionStoreRedis) SessionRelease()
- func (st *SessionStoreRedis) Set(key, value interface{}) error
Constants ¶
const MaxPoolSize = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderRedis ¶
type ProviderRedis struct {
// contains filtered or unexported fields
}
ProviderRedis redis session provider
func (*ProviderRedis) SessionAll ¶
func (pdr *ProviderRedis) SessionAll() ([]string, error)
SessionAll id values in mysql session
func (*ProviderRedis) SessionDestroy ¶
func (pdr *ProviderRedis) SessionDestroy(sid string) error
SessionDestroy delete redis session by id
func (*ProviderRedis) SessionExist ¶
func (pdr *ProviderRedis) SessionExist(sid string) bool
SessionExist check redis session exist by sid
func (*ProviderRedis) SessionGC ¶
func (pdr *ProviderRedis) SessionGC()
SessionGC impl method, no used.
func (*ProviderRedis) SessionInit ¶
func (pdr *ProviderRedis) SessionInit(lifetime int64, savePath string) error
SessionInit init redis session savepath like redis server addr,pool size,password,dbnum,IdleTimeout second e.g. 127.0.0.1:6379,100,astaxie,0,30
func (*ProviderRedis) SessionNew ¶
func (pdr *ProviderRedis) SessionNew(sid string) (session.Store, error)
create new redis session by sid
func (*ProviderRedis) SessionRead ¶
func (pdr *ProviderRedis) SessionRead(sid string) (session.Store, error)
read redis session by sid
func (*ProviderRedis) SessionRegenerate ¶
func (pdr *ProviderRedis) SessionRegenerate(oldSid, sid string) (session.Store, error)
SessionRegenerate generate new sid for redis session
type SessionStoreRedis ¶
type SessionStoreRedis struct {
// contains filtered or unexported fields
}
SessionStoreRedis redis session store
func (*SessionStoreRedis) Delete ¶
func (st *SessionStoreRedis) Delete(key interface{}) error
Delete value in redis session
func (*SessionStoreRedis) Flush ¶
func (st *SessionStoreRedis) Flush() error
Flush clear all values in redis session
func (*SessionStoreRedis) Get ¶
func (st *SessionStoreRedis) Get(key interface{}) interface{}
Get value in redis session
func (*SessionStoreRedis) SessionID ¶
func (st *SessionStoreRedis) SessionID() string
SessionID get redis session id
func (*SessionStoreRedis) SessionRelease ¶
func (st *SessionStoreRedis) SessionRelease()
SessionRelease save session values to redis
func (*SessionStoreRedis) Set ¶
func (st *SessionStoreRedis) Set(key, value interface{}) error
Set value in redis session