Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultSessionTTL = 60
Variables ¶
This section is empty.
Functions ¶
func RegisterLocker ¶
Types ¶
type ILocker ¶
type ILocker interface { Lock(key string, opts ...SessionOption) error Unlock() ErrC() <-chan error }
type NewFunc ¶
func LoadLocker ¶
type SessionOption ¶
type SessionOption func(*SessionOptions)
SessionOption configures Session.
func WithDisableKeepAlive ¶
func WithDisableKeepAlive() SessionOption
func WithErrorNotify ¶
func WithErrorNotify() SessionOption
func WithTTL ¶
func WithTTL(ttl int64) SessionOption
If TTL is <= 0, the default 60 seconds TTL will be used.
func WithWaitTime ¶
func WithWaitTime(waitTime time.Duration) SessionOption
Click to show internal directories.
Click to hide internal directories.