package config
import "github.com/ydb-platform/ydb-go-sdk/v3/discovery/config"
Index ¶
- Constants
- type Config
- type Option
- func WithDatabase(database string) Option
- func WithEndpoint(endpoint string) Option
- func WithInterval(interval time.Duration) Option
- func WithOperationCancelAfter(operationCancelAfter time.Duration) Option
- func WithOperationTimeout(operationTimeout time.Duration) Option
- func WithSecure(ssl bool) Option
- func WithTrace(trace trace.Discovery) Option
Constants ¶
Types ¶
type Config ¶
type Config interface { // Endpoint is a required starting endpoint for connect Endpoint() string // Database is a required database name. Database() string // Secure is an flag for secure connection Secure() bool // OperationTimeout is the maximum amount of time a YDB server will process // an operation. After timeout exceeds YDB will try to cancel operation and // regardless of the cancellation appropriate error will be returned to // the client. // If OperationTimeout is zero then no timeout is used. OperationTimeout() time.Duration // OperationCancelAfter is the maximum amount of time a YDB server will process an // operation. After timeout exceeds YDB will try to cancel operation and if // it succeeds appropriate error will be returned to the client; otherwise // processing will be continued. // If OperationCancelAfter is zero then no timeout is used. OperationCancelAfter() time.Duration // Trace defines trace over discovery client calls Trace() trace.Discovery // Interval is the frequency of background tasks of ydb endpoints discovery. // If Interval is zero then the DefaultInterval is used. // If Interval is negative, then no background discovery prepared. Interval() time.Duration }
func New ¶
type Option ¶
type Option func(c *config)
func WithDatabase ¶
func WithEndpoint ¶
func WithInterval ¶
func WithOperationCancelAfter ¶
func WithOperationTimeout ¶
func WithSecure ¶
func WithTrace ¶
Source Files ¶
- Version
- v3.11.4
- Published
- Feb 22, 2022
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 31 minutes ago –
Tools for package owners.