Documentation ¶
Index ¶
- Constants
- type Config
- type Option
- func With(config config.Common) Option
- func WithPoolMaxSize(size int) Option
- func WithPoolMinSize(size int) Option
- func WithPoolProducersCount(count int) Option
- func WithSessionCreateTimeout(createSessionTimeout time.Duration) Option
- func WithSessionDeleteTimeout(deleteTimeout time.Duration) Option
- func WithTrace(trace *trace.Query, opts ...trace.QueryComposeOption) Option
Constants ¶
const ( DefaultSessionDeleteTimeout = 500 * time.Millisecond DefaultSessionCreateTimeout = 5 * time.Second DefaultPoolMinSize = pool.DefaultMinSize DefaultPoolMaxSize = pool.DefaultMaxSize DefaultPoolProducersCount = pool.DefaultProducersCount )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (*Config) DeleteTimeout ¶
DeleteTimeout limits maximum time spent on Delete request
If DeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.
func (*Config) PoolMaxSize ¶
PoolMaxSize is an upper bound of pooled sessions. If PoolMaxSize is less than or equal to zero then the DefaultPoolMaxSize variable is used as a limit.
func (*Config) PoolMinSize ¶ added in v3.58.0
func (*Config) PoolProducersCount ¶ added in v3.58.0
func (*Config) SessionCreateTimeout ¶ added in v3.58.0
SessionCreateTimeout limits maximum time spent on Create session request
type Option ¶
type Option func(*Config)
func WithPoolMaxSize ¶ added in v3.58.0
WithPoolMaxSize defines upper bound of pooled sessions. If maxSize is less than or equal to zero then the DefaultPoolMaxSize variable is used as a limit.
func WithPoolMinSize ¶ added in v3.58.0
func WithPoolProducersCount ¶ added in v3.58.0
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.