Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func New ¶
New returns a new mysql context that implements the sessions DB interface. The opts param can be used to override the default mysql context settings.
The sessionMaxAge is the max age in seconds of a session. This function cleans up any expired sessions from the database as part of the initialization. A sessionMaxAge of <=0 will cause the sessions database to be dropped and recreated.
Types ¶
type Opts ¶
type Opts struct { // TableName is the table name for the sessions table. TableName string // OpTimeout is the timeout for a single database operation. OpTimeout time.Duration }
Opts contains configurable options for the sessions database. These are not required. Sane defaults are used when the options are not provided.