Documentation ¶
Index ¶
- Constants
- type Config
- type Option
- func With(config config.Common) Option
- func WithPoolLimit(size int) Option
- func WithSessionCreateTimeout(createSessionTimeout time.Duration) Option
- func WithSessionDeleteTimeout(deleteTimeout time.Duration) Option
- func WithSessionIdleTimeToLive(idleTimeToLive time.Duration) Option
- func WithTrace(trace *trace.Query, opts ...trace.QueryComposeOption) Option
Constants ¶
const ( DefaultSessionDeleteTimeout = 500 * time.Millisecond DefaultSessionCreateTimeout = 500 * time.Millisecond DefaultPoolMaxSize = pool.DefaultLimit )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (*Config) PoolLimit ¶ added in v3.59.0
PoolLimit is an upper bound of pooled sessions. If PoolLimit is less than or equal to zero then the DefaultPoolMaxSize variable is used as a pool limit.
func (*Config) SessionCreateTimeout ¶ added in v3.58.0
SessionCreateTimeout limits maximum time spent on Create session request
func (*Config) SessionDeleteTimeout ¶ added in v3.59.0
SessionDeleteTimeout limits maximum time spent on Delete request
If SessionDeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.
func (*Config) SessionIdleTimeToLive ¶ added in v3.80.3
SessionIdleTimeToLive limits maximum time to live of idle session If idleTimeToLive is less than or equal to zero then sessions will not be closed by idle
type Option ¶
type Option func(*Config)
func WithPoolLimit ¶ added in v3.59.0
WithPoolLimit defines upper bound of pooled sessions. If poolLimit is less than or equal to zero then the DefaultPoolMaxSize variable is used as a poolLimit.
func WithSessionCreateTimeout ¶ added in v3.58.0
WithSessionCreateTimeout limits maximum time spent on Create session request If sessionCreateTimeout is less than or equal to zero then no used timeout on create session request
func WithSessionDeleteTimeout ¶ added in v3.58.0
WithSessionDeleteTimeout limits maximum time spent on Delete request If sessionDeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.
func WithSessionIdleTimeToLive ¶ added in v3.80.3
WithSessionIdleTimeToLive limits maximum time to live of idle session If idleTimeToLive is less than or equal to zero then sessions will not be closed by idle