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) CreateStrategyStore ¶
func (f *Factory) CreateStrategyStore() (strategystore.StrategyStore, error)
CreateStrategyStore implements strategystore.Factory
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable
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
Click to show internal directories.
Click to hide internal directories.