ledis

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ledis provide session Provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v1.6.0

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

Provider ledis session provider

func (*Provider) SessionAll added in v1.6.0

func (lp *Provider) SessionAll() int

SessionAll return all active session

func (*Provider) SessionDestroy added in v1.6.0

func (lp *Provider) SessionDestroy(sid string) error

SessionDestroy delete ledis session by id

func (*Provider) SessionExist added in v1.6.0

func (lp *Provider) SessionExist(sid string) bool

SessionExist check ledis session exist by sid

func (*Provider) SessionGC added in v1.6.0

func (lp *Provider) SessionGC()

SessionGC Impelment method, no used.

func (*Provider) SessionInit added in v1.6.0

func (lp *Provider) SessionInit(maxlifetime int64, savePath string) error

SessionInit init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie

func (*Provider) SessionRead added in v1.6.0

func (lp *Provider) SessionRead(sid string) (session.Store, error)

SessionRead read ledis session by sid

func (*Provider) SessionRegenerate added in v1.6.0

func (lp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)

SessionRegenerate generate new sid for ledis session

type SessionStore added in v1.6.0

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

SessionStore ledis session store

func (*SessionStore) Delete added in v1.6.0

func (ls *SessionStore) Delete(key interface{}) error

Delete value in ledis session

func (*SessionStore) Flush added in v1.6.0

func (ls *SessionStore) Flush() error

Flush clear all values in ledis session

func (*SessionStore) Get added in v1.6.0

func (ls *SessionStore) Get(key interface{}) interface{}

Get value in ledis session

func (*SessionStore) SessionID added in v1.6.0

func (ls *SessionStore) SessionID() string

SessionID get ledis session id

func (*SessionStore) SessionRelease added in v1.6.0

func (ls *SessionStore) SessionRelease(w http.ResponseWriter)

SessionRelease save session values to ledis

func (*SessionStore) Set added in v1.6.0

func (ls *SessionStore) Set(key, value interface{}) error

Set value in ledis session

Jump to

Keyboard shortcuts

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