strategystore

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// SamplingTypeEnvVar is the name of the env var that defines the type of sampling strategy store used.
	SamplingTypeEnvVar = "SAMPLING_TYPE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	FactoryConfig
	// contains filtered or unexported fields
}

Factory implements strategystore.Factory interface as a meta-factory for strategy storage components.

func NewFactory

func NewFactory(config FactoryConfig) (*Factory, error)

NewFactory creates the meta-factory.

func (*Factory) AddFlags

func (f *Factory) AddFlags(flagSet *flag.FlagSet)

AddFlags implements plugin.Configurable

func (*Factory) CreateStrategyStore

func (f *Factory) CreateStrategyStore() (strategystore.StrategyStore, error)

CreateStrategyStore implements strategystore.Factory

func (*Factory) InitFromViper

func (f *Factory) InitFromViper(v *viper.Viper)

InitFromViper implements plugin.Configurable

func (*Factory) Initialize

func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error

Initialize implements strategystore.Factory

type FactoryConfig

type FactoryConfig struct {
	StrategyStoreType string
}

FactoryConfig tells the Factory what sampling type it needs to create.

func FactoryConfigFromEnv

func FactoryConfigFromEnv() FactoryConfig

FactoryConfigFromEnv reads the desired sampling type from the SAMPLING_TYPE environment variable. Allowed values:

  • `static` - built-in
  • `adaptive` - built-in // TODO

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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