 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func LoadSessionBySessionId(s *Store, sessionId string) (*sessions.Session, error)
- func SaveSessionWithoutContext(s *Store, sessionId string, session *sessions.Session) error
- type Store
- func (s *Store) Close() error
- func (s *Store) Get(r *http.Request, name string) (*sessions.Session, error)
- func (s *Store) New(r *http.Request, name string) (*sessions.Session, error)
- func (s *Store) Options(options hs.Options)
- func (s *Store) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (s *Store) SetKeyPrefix(p string)
- func (s *Store) SetMaxLength(l int)
- func (s *Store) SetSerializer(ss hs.Serializer)
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSessionBySessionId ¶
LoadSessionBySessionId Get session using session_id even without a context
Types ¶
type Store ¶
type Store struct {
	Rdb           *redis.ClusterClient
	Codecs        []securecookie.Codec
	Opts          *sessions.Options // default configuration
	DefaultMaxAge int               // default Redis TTL for a MaxAge == 0 session
	// contains filtered or unexported fields
}
    func NewStore ¶
func NewStore(maxIdle int, addrs []string, password string, newClient func(opt *redis.Options) *redis.Client, kvs ...[]byte) (*Store, error)
NewStore returns a new rediscluster.Store
func NewStoreWithOption ¶
NewStoreWithOption returns a new rediscluster.Store by setting *redis.ClusterOptions
func (*Store) SetMaxLength ¶
SetMaxLength sets RedisClusterStore.maxLength if the `l` argument is greater or equal 0 maxLength restricts the maximum length of new sessions to l. If l is 0 there is no limit to the size of a session, use with caution. The default for a new RedisClusterStore is 4096. Redis allows for max. value sizes of up to 512MB (http://redis.io/topics/data-types) Default: 4096,
func (*Store) SetSerializer ¶
func (s *Store) SetSerializer(ss hs.Serializer)
SetSerializer sets the serializer
 Click to show internal directories. 
   Click to hide internal directories.