app

package
v0.0.0-...-bf958af Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UseRFC3339           bool          `env:"USE_RFC3339, report"`
	APIURL               string        `env:"API_URL,              required, report"`
	APICAFile            string        `env:"API_CA_FILE_PATH,     required, report"`
	APICertFile          string        `env:"API_CERT_FILE_PATH,   required, report"`
	APIKeyFile           string        `env:"API_KEY_FILE_PATH,    required, report"`
	APICommonName        string        `env:"API_COMMON_NAME,      required, report"`
	APIPollingInterval   time.Duration `env:"API_POLLING_INTERVAL, report"`
	APIBatchSize         int           `env:"API_BATCH_SIZE, report"`
	APIDisableKeepAlives bool          `env:"API_DISABLE_KEEP_ALIVES, report"`
	CipherSuites         []string      `env:"CIPHER_SUITES, report"`
	AggregateDrainsFile  string        `env:"AGGREGATE_DRAINS_FILE, report"`

	CacheCAFile     string `env:"CACHE_CA_FILE_PATH,     required, report"`
	CacheCertFile   string `env:"CACHE_CERT_FILE_PATH,   required, report"`
	CacheKeyFile    string `env:"CACHE_KEY_FILE_PATH,    required, report"`
	CacheCommonName string `env:"CACHE_COMMON_NAME,      required, report"`

	CachePort int `env:"CACHE_PORT, required, report"`

	MetricsServer config.MetricsServer

	GRPC      GRPC
	Blacklist blacklist.BlacklistRanges `env:"BLACKLISTED_SYSLOG_RANGES, report"`

	WarnOnInvalidDrains bool `env:"WARN_ON_INVALID_DRAINS,    report"`
}

Config holds the configuration for the syslog binding cache

func LoadConfig

func LoadConfig() Config

LoadConfig will load the configuration for the syslog binding cache from the environment. If loading the config fails for any reason this function will panic.

type GRPC

type GRPC struct {
	Host         string   `env:"LOGGREGATOR_AGENT_HOST,                     report"`
	Port         int      `env:"LOGGREGATOR_AGENT_PORT,                     report"`
	CAFile       string   `env:"LOGGREGATOR_AGENT_CA_FILE_PATH,   required, report"`
	CertFile     string   `env:"LOGGREGATOR_AGENT_CERT_FILE_PATH, required, report"`
	KeyFile      string   `env:"LOGGREGATOR_AGENT_KEY_FILE_PATH,  required, report"`
	CipherSuites []string `env:"LOGGREGATOR_AGENT_CIPHER_SUITES,            report"`
}

GRPC stores the configuration for the forwarder agent using a PORT with mTLS certs and as a client.

type IPChecker

type IPChecker interface {
	ResolveAddr(host string) (net.IP, error)
	CheckBlacklist(ip net.IP) error
}

type Metrics

type Metrics interface {
	NewCounter(name, helpText string, options ...metrics.MetricOption) metrics.Counter
	NewGauge(name, helpText string, o ...metrics.MetricOption) metrics.Gauge
	RegisterDebugMetrics()
}

type SyslogBindingCache

type SyslogBindingCache struct {
	// contains filtered or unexported fields
}

func NewSyslogBindingCache

func NewSyslogBindingCache(config Config, metrics Metrics, logger *log.Logger) *SyslogBindingCache

func (*SyslogBindingCache) Run

func (sbc *SyslogBindingCache) Run()

func (*SyslogBindingCache) Stop

func (sbc *SyslogBindingCache) Stop()

Jump to

Keyboard shortcuts

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