Documentation
¶
Index ¶
- Variables
- type Config
- type Provider
- func (p *Provider) Count() int
- func (p *Provider) Destroy(id []byte) error
- func (p *Provider) GC() error
- func (p *Provider) Get(id []byte) ([]byte, error)
- func (p *Provider) NeedGC() bool
- func (p *Provider) Regenerate(id, newID []byte, expiration time.Duration) error
- func (p *Provider) Save(id, data []byte, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Prefix key
KeyPrefix string
// Server list
ServerList []string
// The socket read/write timeout.
// If zero, DefaultTimeout is used.
Timeout time.Duration
// The maximum number of idle connections that will
// be maintained per address. If less than one, DefaultMaxIdleConns will be
// used.
//
// Consider your expected traffic rates and latency carefully. This should
// be set to a number higher than your peak parallel requests.
MaxIdleConns int
}
Config provider settings
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider backend manager
func (*Provider) Regenerate ¶
Regenerate updates the session id and expiration with the new session id of the the given current session id
Click to show internal directories.
Click to hide internal directories.