Documentation ¶
Index ¶
Constants ¶
View Source
const (
// StorageTypeEnvVar is the name of the env var that defines the type of backend used for metrics storage.
StorageTypeEnvVar = "METRICS_STORAGE_TYPE"
)
Variables ¶
View Source
var AllStorageTypes = []string{prometheusStorageType}
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) CreateMetricsReader ¶
func (f *Factory) CreateMetricsReader() (metricsstore.Reader, error)
CreateMetricsReader implements storage.MetricsFactory.
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable.
type FactoryConfig ¶
type FactoryConfig struct {
MetricsStorageType string
}
FactoryConfig tells the Factory which types of backends it needs to create for different storage types.
func FactoryConfigFromEnv ¶
func FactoryConfigFromEnv() FactoryConfig
FactoryConfigFromEnv reads the desired types of storage backends from METRICS_STORAGE_TYPE.
Click to show internal directories.
Click to hide internal directories.