Documentation ¶
Index ¶
- Constants
- Variables
- type Factory
- func (f *Factory) AddFlags(flagSet *flag.FlagSet)
- func (f *Factory) AddPipelineFlags(flagSet *flag.FlagSet)
- func (f *Factory) Close() error
- func (f *Factory) CreateWriter() (metricstore.Writer, error)
- func (f *Factory) InitFromViper(v *viper.Viper)
- func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error
- type FactoryConfig
Constants ¶
View Source
const ( // TypeEnvVar is the name of the env var that defines the type of backend used for time series storage. TypeEnvVar = "TS_STORAGE_TYPE" // DependencyStorageTypeEnvVar is the name of the env var that defines the type of backend used for dependencies storage. DependencyStorageTypeEnvVar = "DEPENDENCY_STORAGE_TYPE" )
Variables ¶
View Source
var AllStorageTypes = []string{influxDbStorageType, elasticsearchStorageType, prometheusStorageType, kafkaStorageType,
gatewayStorageType, cortexStorageType, kdbStorageType, opentsdbStorageType}
AllStorageTypes defines all available storage backends
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { FactoryConfig // contains filtered or unexported fields }
Factory implements storage.Factory interface as a meta-factory for storage components.
func NewFactory ¶
func NewFactory(config FactoryConfig) (*Factory, error)
NewFactory creates the meta-factory.
func (*Factory) AddPipelineFlags ¶
func (*Factory) CreateWriter ¶
func (f *Factory) CreateWriter() (metricstore.Writer, error)
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable
type FactoryConfig ¶
FactoryConfig tells the Factory which types of backends it needs to create for different storage types.
func FactoryConfigFromEnvAndCLI ¶
func FactoryConfigFromEnvAndCLI(log io.Writer) FactoryConfig
FactoryConfigFromEnvAndCLI reads the desired types of storage backends from TS_STORAGE_TYPE and DEPENDENCY_STORAGE_TYPE environment variables. Allowed values:
- `influxdb` - built-in
- `es` - built-in
- `prometheus` - built-in
- `kafka` - built-in
- `gateway` - built-in
- `cortex` - built-in
- `kdb` - built-in
- `opentsdb` - built-in
- `plugin` - loads a dynamic plugin that implements storage.Factory interface (not supported at the moment)
For backwards compatibility it also parses the args looking for deprecated --ts-storage.type flag. If found, it writes a deprecation warning to the log.
Click to show internal directories.
Click to hide internal directories.