config

package
v3.11.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInterval = time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Endpoint() string
	Database() string
	Secure() bool
	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

func New(opts ...Option) Config

type Option

type Option func(c *config)

func WithDatabase

func WithDatabase(database string) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithInterval

func WithInterval(interval time.Duration) Option

func WithSecure

func WithSecure(ssl bool) Option

func WithTrace

func WithTrace(trace trace.Discovery) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL