Documentation ¶
Index ¶
- type NodbProvider
- func (p *NodbProvider) Count() int
- func (p *NodbProvider) Destory(sid string) error
- func (p *NodbProvider) Exist(sid string) bool
- func (p *NodbProvider) GC()
- func (p *NodbProvider) Init(expire int64, configs string) error
- func (p *NodbProvider) Read(sid string) (session.RawStore, error)
- func (p *NodbProvider) Regenerate(oldsid, sid string) (_ session.RawStore, err error)
- type NodbStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodbProvider ¶
type NodbProvider struct {
// contains filtered or unexported fields
}
NodbProvider represents a ledis session provider implementation.
func (*NodbProvider) Count ¶
func (p *NodbProvider) Count() int
Count counts and returns number of sessions.
func (*NodbProvider) Destory ¶
func (p *NodbProvider) Destory(sid string) error
Destory deletes a session by session ID.
func (*NodbProvider) Exist ¶
func (p *NodbProvider) Exist(sid string) bool
Exist returns true if session with given ID exists.
func (*NodbProvider) Init ¶
func (p *NodbProvider) Init(expire int64, configs string) error
Init initializes nodb session provider.
func (*NodbProvider) Read ¶
func (p *NodbProvider) Read(sid string) (session.RawStore, error)
Read returns raw session store by session ID.
func (*NodbProvider) Regenerate ¶
func (p *NodbProvider) Regenerate(oldsid, sid string) (_ session.RawStore, err error)
Regenerate regenerates a session store from old session ID to new one.
type NodbStore ¶
type NodbStore struct {
// contains filtered or unexported fields
}
NodbStore represents a nodb session store implementation.
func NewNodbStore ¶
NewNodbStore creates and returns a ledis session store.
func (*NodbStore) Get ¶
func (s *NodbStore) Get(key interface{}) interface{}
Get gets value by given key in session.
Click to show internal directories.
Click to hide internal directories.