config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	NodeID           string        `yaml:"node_id"`
	ServerAddress    string        `yaml:"server_address"`
	ReconnectBackoff time.Duration `yaml:"reconnect_backoff"`
	SendQueueSize    int           `yaml:"send_queue_size"`
	ControlTimeout   time.Duration `yaml:"control_timeout"`
	Report           ReportConfig  `yaml:"report"`
	Log              LogConfig     `yaml:"log"`
	TLS              TLSConfig     `yaml:"tls"`
}

func DefaultAgentConfig

func DefaultAgentConfig() AgentConfig

func LoadAgentConfig

func LoadAgentConfig(path string) (AgentConfig, error)

type LogConfig

type LogConfig struct {
	Level  string `yaml:"level"`
	Format string `yaml:"format"`
}

type ReportConfig

type ReportConfig struct {
	Intervals   map[string]time.Duration `yaml:"intervals"`
	Heartbeat   time.Duration            `yaml:"heartbeat"`
	BatchFlush  time.Duration            `yaml:"batch_flush"`
	MaxPerBatch int                      `yaml:"max_per_batch"`
}

func (ReportConfig) Interval

func (r ReportConfig) Interval(key string, fallback time.Duration) time.Duration

type ServerConfig

type ServerConfig struct {
	GRPCListen        string        `yaml:"grpc_listen"`
	HTTPListen        string        `yaml:"http_listen"`
	Retention         time.Duration `yaml:"retention"`
	MaxSamplesPerNode int           `yaml:"max_samples_per_node"`
	IngestQueueSize   int           `yaml:"ingest_queue_size"`
	PerNodeQueueSize  int           `yaml:"per_node_queue_size"`
	CommandTimeout    time.Duration `yaml:"command_timeout"`
	HTTPReadTimeout   time.Duration `yaml:"http_read_timeout"`
	HTTPWriteTimeout  time.Duration `yaml:"http_write_timeout"`
	HTTPIdleTimeout   time.Duration `yaml:"http_idle_timeout"`
	Log               LogConfig     `yaml:"log"`
	TLS               TLSConfig     `yaml:"tls"`
}

func DefaultServerConfig

func DefaultServerConfig() ServerConfig

func LoadServerConfig

func LoadServerConfig(path string) (ServerConfig, error)

type TLSConfig

type TLSConfig struct {
	CAFile             string `yaml:"ca_file"`
	CertFile           string `yaml:"cert_file"`
	KeyFile            string `yaml:"key_file"`
	ServerNameOverride string `yaml:"server_name_override"`
}

Jump to

Keyboard shortcuts

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