package config
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/discovery/config"
Index ¶
- Constants
- type Config
- func New(opts ...Option) Config
- func (c Config) Database() string
- func (c Config) Endpoint() string
- func (c Config) Interval() time.Duration
- func (c Config) Meta() meta.Meta
- func (c Config) Secure() bool
- func (c Config) Trace() trace.Discovery
- type Option
- func With(config config.Common) Option
- func WithDatabase(database string) Option
- func WithEndpoint(endpoint string) Option
- func WithInterval(interval time.Duration) Option
- func WithMeta(meta meta.Meta) Option
- func WithSecure(ssl bool) Option
- func WithTrace(trace trace.Discovery, opts ...trace.DiscoveryComposeOption) Option
Constants ¶
Types ¶
type Config ¶
func New ¶
func (Config) Database ¶
func (Config) Endpoint ¶
func (Config) Interval ¶
func (Config) Meta ¶
func (Config) Secure ¶
func (Config) Trace ¶
type Option ¶
type Option func(c *Config)
func With ¶
With applies common configuration params
func WithDatabase ¶
WithDatabase set a required database name.
func WithEndpoint ¶
WithEndpoint set a required starting endpoint for connect
func WithInterval ¶
WithInterval set 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.
func WithMeta ¶
WithMeta is not for user.
This option add meta information about database connection
func WithSecure ¶
WithSecure set flag for secure connection
func WithTrace ¶
func WithTrace(trace trace.Discovery, opts ...trace.DiscoveryComposeOption) Option
WithTrace configures discovery client calls tracing
Source Files ¶
- Version
- v3.26.4
- Published
- May 26, 2022
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 9 seconds ago –
Tools for package owners.