config

package
v0.12.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compression

type Compression string
const (
	CompressionGzip Compression = "gzip"
)

type Config

type Config struct {
	PodIP          string          `envconfig:"POD_IP" yaml:"podIP"`
	PodNamespace   string          `envconfig:"POD_NAMESPACE" yaml:"podNamespace"`
	ExportInterval time.Duration   `envconfig:"EXPORT_INTERVAL" yaml:"exportInterval"`
	Sinks          map[string]Sink `yaml:"sinks"`
}

func Load

func Load(configPath string) (Config, error)

type Encoding

type Encoding string
const (
	EncodingProtobuf Encoding = "protobuf"
)

type Sink

type Sink struct {
	HTTPConfig            *SinkHTTPConfig            `yaml:"http,omitempty"`
	PromRemoteWriteConfig *SinkPromRemoteWriteConfig `yaml:"prom_remote_write,omitempty"`
}

type SinkHTTPConfig

type SinkHTTPConfig struct {
	URL         string            `yaml:"url"`
	Method      string            `yaml:"method"`
	Compression Compression       `yaml:"compression"`
	Encoding    Encoding          `yaml:"encoding"`
	Headers     map[string]string `yaml:"headers"`
	Timeout     time.Duration     `yaml:"timeout"`
}

type SinkPromRemoteWriteConfig

type SinkPromRemoteWriteConfig struct {
	URL     string            `yaml:"url"`
	Headers map[string]string `yaml:"headers"`
}

type SinkType

type SinkType string
const (
	SinkTypeHTTP            SinkType = "http"
	SinkTypePromRemoteWrite SinkType = "prom_remote_write"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL