Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { Options *Options // contains filtered or unexported fields }
Factory implements storage.Factory for Elasticsearch backend.
func (*Factory) CreateWriter ¶
func (f *Factory) CreateWriter() (metricstore.Writer, error)
func (*Factory) InitFromOptions ¶
InitFromOptions configures factory from Options struct.
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable
type MetricWriter ¶
type MetricWriter struct {
// contains filtered or unexported fields
}
func NewMetricWriter ¶
func NewMetricWriter(p MetricWriterParams) *MetricWriter
NewMetricWriter creates a new MetricWriter for use
func (*MetricWriter) WriteMetric ¶
func (s *MetricWriter) WriteMetric(metrics []prompb.TimeSeries) error
type MetricWriterParams ¶
type MetricWriterParams struct { Logger *zap.Logger Client es.Client IndexPrefix string Archive bool }
MetricWriterParams holds constructor parameters for NewMetricWriter
type Options ¶
type Options struct { Primary namespaceConfig `mapstructure:",squash"` // contains filtered or unexported fields }
Options contains various type of Elasticsearch configs and provides the ability to bind them to command line flag and apply overlays, so that some configurations (e.g. archive) may be underspecified and infer the rest of its parameters from primary.
func NewOptions ¶
NewOptions creates a new Options struct.
func (*Options) Get ¶
func (opt *Options) Get(namespace string) *config.Configuration
Get returns auxiliary named configuration.
func (*Options) GetPrimary ¶
func (opt *Options) GetPrimary() *config.Configuration
GetPrimary returns primary configuration.
func (*Options) InitFromViper ¶
InitFromViper initializes Options with properties from viper