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) Clock() clockwork.Clock
- 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) MutateAddress(fqdn string) string
- func (c *Config) Secure() bool
- func (c *Config) Trace() *trace.Discovery
- type Option
- func With(config config.Common) Option
- func WithAddressMutator(addressMutator func(address string) string) Option
- func WithClock(clock clockwork.Clock) 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) Clock ¶
func (*Config) Database ¶
func (*Config) Endpoint ¶
func (*Config) Interval ¶
func (*Config) Meta ¶
func (*Config) MutateAddress ¶
func (*Config) Secure ¶
func (*Config) Trace ¶
type Option ¶
type Option func(c *Config)
func With ¶
With applies common configuration params
func WithAddressMutator ¶
func WithClock ¶
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.68.1
- Published
- May 24, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 12 seconds ago –
Tools for package owners.