Documentation ¶
Index ¶
Constants ¶
const ( DefaultSessionPoolDeleteTimeout = 500 * time.Millisecond DefaultSessionPoolCreateSessionTimeout = 5 * time.Second DefaultSessionPoolSizeLimit = 50 DefaultSessionPoolIdleThreshold = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (*Config) CreateSessionTimeout ¶
CreateSessionTimeout limits maximum time spent on Create session request
func (*Config) DeleteTimeout ¶
DeleteTimeout limits maximum time spent on Delete request
If DeleteTimeout is less than or equal to zero then the DefaultSessionPoolDeleteTimeout is used.
func (*Config) IdleThreshold ¶
IdleThreshold is a maximum duration between any activity within session. If this threshold reached, idle session will be closed
If IdleThreshold is less than zero then there is no idle limit. If IdleThreshold is zero, then the DefaultSessionPoolIdleThreshold value is used.
type Option ¶
type Option func(*Config)
func WithCreateSessionTimeout ¶
WithCreateSessionTimeout limits maximum time spent on Create session request If createSessionTimeout is less than or equal to zero then no used timeout on create session request
func WithDeleteTimeout ¶
WithDeleteTimeout limits maximum time spent on Delete request If deleteTimeout is less than or equal to zero then the DefaultSessionPoolDeleteTimeout is used.
func WithIdleThreshold ¶
WithIdleThreshold sets maximum duration between any activity within session. If this threshold reached, session will be closed.
If idleThreshold is less than zero then there is no idle limit. If idleThreshold is zero, then the DefaultSessionPoolIdleThreshold value is used.
func WithSizeLimit ¶
WithSizeLimit defines upper bound of pooled sessions. If sizeLimit is less than or equal to zero then the DefaultSessionPoolSizeLimit variable is used as a limit.