Documentation ¶
Overview ¶
Package etcdstore is a session store backend for gorilla/sessions
Index ¶
- type EtcdStore
- func (s *EtcdStore) Close() error
- func (s *EtcdStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (s *EtcdStore) MaxAge(age int)
- func (s *EtcdStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (s *EtcdStore) Save(_ *http.Request, w http.ResponseWriter, session *sessions.Session) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdStore ¶
type EtcdStore struct { Client *clientv3.Client Context context.Context Codecs []securecookie.Codec Options *sessions.Options // contains filtered or unexported fields }
EtcdStore stores sessions in a etcd backend.
func NewEtcdStore ¶
func (*EtcdStore) Get ¶
Get returns a session for the given name after adding it to the registry.
See gorilla/sessions CookieStore.Get().
func (*EtcdStore) MaxAge ¶
MaxAge sets the maximum age for the store and the underlying cookie implementation. Individual sessions can be deleted by setting Options.MaxAge = -1 for that session.
Click to show internal directories.
Click to hide internal directories.