Files
at-container-registry/pkg/config/logshipper.go

28 lines
1.2 KiB
Go

// Package config provides shared configuration types and Viper helpers
// used by both the AppView and Hold services.
package config
import "time"
// LogShipperConfig defines remote log shipping settings.
// Shared by both AppView and Hold services.
type LogShipperConfig struct {
// Log shipping backend. Empty disables shipping.
Backend string `yaml:"backend" comment:"Log shipping backend: \"victoria\", \"opensearch\", or \"loki\". Empty disables shipping."`
// Remote log service endpoint.
URL string `yaml:"url" comment:"Remote log service endpoint, e.g. \"http://victorialogs:9428\"."`
// Number of log entries to buffer before flushing.
BatchSize int `yaml:"batch_size" comment:"Number of log entries to buffer before flushing to the remote service."`
// Maximum time between flushes, even if batch is not full.
FlushInterval time.Duration `yaml:"flush_interval" comment:"Maximum time between flushes, even if batch is not full."`
// Basic auth username for the log service (optional).
Username string `yaml:"username" comment:"Basic auth username for the log service (optional)."`
// Basic auth password for the log service (optional).
Password string `yaml:"password" comment:"Basic auth password for the log service (optional)."`
}