package config
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/query/config"
Index ¶
- Constants
- type Config
- func New(opts ...Option) *Config
- func (c *Config) PoolLimit() int
- func (c *Config) SessionCreateTimeout() time.Duration
- func (c *Config) SessionDeleteTimeout() time.Duration
- func (c *Config) Trace() *trace.Query
- func (c *Config) UseSessionPool() bool
- type Option
Constants ¶
const ( DefaultSessionDeleteTimeout = 500 * time.Millisecond DefaultSessionCreateTimeout = 500 * time.Millisecond DefaultPoolMaxSize = pool.DefaultLimit )
Types ¶
type Config ¶
func New ¶
func (*Config) PoolLimit ¶
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 ¶
SessionCreateTimeout limits maximum time spent on Create session request
func (*Config) SessionDeleteTimeout ¶
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 ¶
Trace defines trace over table client calls
func (*Config) UseSessionPool ¶
type Option ¶
type Option func(*Config)
func With ¶
With applies common configuration params
func WithPoolLimit ¶
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 ¶
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 ¶
WithSessionDeleteTimeout limits maximum time spent on Delete request If sessionDeleteTimeout is less than or equal to zero then the DefaultSessionDeleteTimeout is used.
func WithTrace ¶
func WithTrace(trace *trace.Query, opts ...trace.QueryComposeOption) Option
WithTrace appends table trace to early defined traces
Source Files ¶
- Version
- v3.77.0-rc0
- Published
- Aug 19, 2024
- Platform
- darwin/amd64
- Imports
- 5 packages
- Last checked
- 36 seconds ago –
Tools for package owners.