Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapSeries ¶
func MapSeries(ts TimeSeries) prompb.TimeSeries
func MapTrend ¶
func MapTrend(series TimeSeries, t time.Time, sink *trendSink) []prompb.TimeSeries
Types ¶
type Config ¶
type Config struct { Mapping null.String `json:"mapping" envconfig:"K6_PROMETHEUS_MAPPING"` Url null.String `json:"url" envconfig:"K6_PROMETHEUS_REMOTE_URL"` // here, in the name of env variable, we assume that we won't need to distinguish between remote write URL vs remote read URL Headers map[string]string `json:"headers" envconfig:"K6_PROMETHEUS_HEADERS"` InsecureSkipTLSVerify null.Bool `json:"insecureSkipTLSVerify" envconfig:"K6_PROMETHEUS_INSECURE_SKIP_TLS_VERIFY"` CACert null.String `json:"caCertFile" envconfig:"K6_CA_CERT_FILE"` CertFile null.String `json:"certFile" envconfig:"K6_CERT_FILE"` KeyFile null.String `json:"keyFile" envconfig:"K6_KEY_FILE"` User null.String `json:"user" envconfig:"K6_PROMETHEUS_USER"` Password null.String `json:"password" envconfig:"K6_PROMETHEUS_PASSWORD"` FlushPeriod types.NullDuration `json:"flushPeriod" envconfig:"K6_PROMETHEUS_FLUSH_PERIOD"` KeepTags null.Bool `json:"keepTags" envconfig:"K6_KEEP_TAGS"` KeepNameTag null.Bool `json:"keepNameTag" envconfig:"K6_KEEP_NAME_TAG"` KeepUrlTag null.Bool `json:"keepUrlTag" envconfig:"K6_KEEP_URL_TAG"` }
func GetConsolidatedConfig ¶
func GetConsolidatedConfig(jsonRawConf json.RawMessage, env map[string]string, arg string) (Config, error)
GetConsolidatedConfig combines {default config values + JSON config + environment vars + arg config values}, and returns the final result.
func (Config) ConstructRemoteConfig ¶
func (conf Config) ConstructRemoteConfig() (*remote.ClientConfig, error)
type Output ¶
type Output struct { output.SampleBuffer // contains filtered or unexported fields }
func (*Output) Description ¶
type TimeSeries ¶
type TimeSeries struct { Metric *metrics.Metric Tags *metrics.SampleTags }
Click to show internal directories.
Click to hide internal directories.