This method is used to get all sessions in the store as an array. The
callback
should be called as callback(error, sessions)
.
Logging callback result
This method is used to delete all sessions from the store. The callback
should be called as callback(error)
once the store is cleared.
This method is used to destroy/delete a session from the store given
a session ID (sid
). The callback
should be called as callback(error)
once the session is destroyed.
This method is used to get a session from the store given a session
ID (sid
). The callback
should be called as callback(error, session)
.
The session
argument should be a session if found, otherwise null
or
undefined
if the session was not found (and there was no error). A special
case is made when error.code === 'ENOENT'
to act like callback(null, null)
.
Get the raw Time to Live (ttl
) of the session from the data sources
Get the Time to Live (ttl
) of the session
Build the etcd key with the right prefix and the givin session ID (sid
)
This method is used to get the count of all sessions in the store.
The callback
should be called as callback(error, len)
.
This required method is used to upsert a session into the store given a
session ID (sid
) and session (session
) object. The callback should be
called as callback(error)
once the session has been set in the store.
This method is used to "touch" a given session given a
session ID (sid
) and session (session
) object. The callback
should be
called as callback(error)
once the session has been touched.
This is primarily used when the store will automatically delete idle sessions and this method is used to signal to the store the given session is active, potentially resetting the idle timer.
Generated using TypeDoc
An etcd v3 store adapter for Express session using etcd3 client.
var session = require('express-session'); var Etcd3Store = require('express-session-etcd3'); app.use(session({ store: new Etcd3Store(options), secret: 'keyboard cat', resave: false }));