Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownDriver = errors.New("unknown driver")
Functions ¶
func Register ¶
func Register(scheme string, constructor Constructor)
Register registers a constructor for the given scheme
func SetDefault ¶
func SetDefault(scheme string)
SetDefault sets the default driver scheme The default driver is used when an endpoint is not specified
Types ¶
type Config ¶
type Config struct {
MetricsRegisterer prometheus.Registerer
Endpoint string
Scheme string
DataSourceName string
ConnectionPoolConfig generic.ConnectionPoolConfig
BackendTLSConfig tls.Config
CompactInterval time.Duration
CompactIntervalJitter int
CompactTimeout time.Duration
CompactMinRetain int64
CompactBatchSize int64
PollBatchSize int64
}
type Constructor ¶
type Constructor func(ctx context.Context, wg *sync.WaitGroup, cfg *Config) (leaderElect bool, backend server.Backend, err error)
Constructor is a function that takes a context, waitgroup, and config and returns a leaderElect bool, a server.Backend and an error
func Get ¶
func Get(scheme string) (Constructor, bool)
Get returns the constructor for the given scheme The second return value is true if the scheme is registered, false otherwise
Click to show internal directories.
Click to hide internal directories.