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) Clock() clockwork.Clock
- func (c *Config) CreateSessionTimeout() time.Duration
- func (c *Config) DeleteTimeout() time.Duration
- func (c *Config) PoolMaxSize() int
- func (c *Config) Trace() *trace.Query
- type Option
Constants ¶
const ( DefaultPoolDeleteTimeout = 500 * time.Millisecond DefaultPoolCreateSessionTimeout = 5 * time.Second DefaultPoolMaxSize = 50 )
Types ¶
type Config ¶
func New ¶
func (*Config) Clock ¶
Clock defines clock
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 DefaultPoolDeleteTimeout 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) Trace ¶
Trace defines trace over table client calls
type Option ¶
type Option func(*Config)
func With ¶
With applies common configuration params
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 DefaultPoolDeleteTimeout is used.
func WithSizeLimit ¶
WithSizeLimit defines upper bound of pooled sessions. If sizeLimit is less than or equal to zero then the DefaultPoolMaxSize variable is used as a limit.
func WithTrace ¶
func WithTrace(trace *trace.Query, opts ...trace.QueryComposeOption) Option
WithTrace appends table trace to early defined traces
Source Files ¶
- Version
- v3.57.3
- Published
- Mar 12, 2024
- Platform
- windows/amd64
- Imports
- 4 packages
- Last checked
- 3 minutes ago –
Tools for package owners.