config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchConfig

type BatchConfig struct {
	MaxItems int           `yaml:"max_items"`
	MaxWait  time.Duration `yaml:"max_wait"`
}

type Config

type Config struct {
	Listen  string            `yaml:"listen"`
	Input   InputConfig       `yaml:"input"`
	Loki    LokiConfig        `yaml:"loki"`
	Devices map[string]string `yaml:"devices"`
}

func Load

func Load(path string) (Config, error)

type InputConfig

type InputConfig struct {
	UDP UDPConfig `yaml:"udp"`
}

type LokiConfig

type LokiConfig struct {
	URL     string            `yaml:"url"`
	Timeout time.Duration     `yaml:"timeout"`
	Labels  LokiLabels        `yaml:"labels"`
	Batch   BatchConfig       `yaml:"batch"`
	Headers map[string]string `yaml:"headers,omitempty"`
}

type LokiLabels

type LokiLabels struct {
	Job string `yaml:"job"`
}

type UDPConfig

type UDPConfig struct {
	QueueSize int `yaml:"queue_size"`
}

Jump to

Keyboard shortcuts

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