config

package
v3.65.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

type Config struct {
	config.Common
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Config

func (*Config) PoolLimit added in v3.59.0

func (c *Config) PoolLimit() int

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

func (c *Config) SessionCreateTimeout() time.Duration

SessionCreateTimeout limits maximum time spent on Create session request

func (*Config) SessionDeleteTimeout added in v3.59.0

func (c *Config) SessionDeleteTimeout() time.Duration

SessionDeleteTimeout limits maximum time spent on Delete request

If SessionDeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.

func (*Config) Trace

func (c *Config) Trace() *trace.Query

Trace defines trace over table client calls

type Option

type Option func(*Config)

func With

func With(config config.Common) Option

With applies common configuration params

func WithPoolLimit added in v3.59.0

func WithPoolLimit(size int) Option

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

func WithSessionCreateTimeout(createSessionTimeout time.Duration) Option

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

func WithSessionDeleteTimeout(deleteTimeout time.Duration) Option

WithSessionDeleteTimeout limits maximum time spent on Delete request If sessionDeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.

func WithTrace added in v3.57.1

func WithTrace(trace *trace.Query, opts ...trace.QueryComposeOption) Option

WithTrace appends table trace to early defined traces

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL