schema

package
v0.0.0-...-bb113c0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package schema defines shared configuration types for collector packages. This package exists to avoid circular imports between collector, syslog, and netflow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveWindowsEventChannels

func ResolveWindowsEventChannels(path string, defaults []string) (channels, skipped []string, err error)

ResolveWindowsEventChannels returns defaults plus the extra channels listed in path, creating that file from a documented template when it is missing. It never returns fewer channels than defaults: an unreadable or malformed file degrades to defaults and a non-nil error. skipped describes ignored entries.

func ValidatePortChange

func ValidatePortChange(newPort string) bool

ValidatePortChange returns true if the port is within the valid range.

func WriteCollectorConfig

func WriteCollectorConfig(cnf *CollectorConfig) error

WriteCollectorConfig writes the collector configuration to disk.

Types

type CollectorConfig

type CollectorConfig struct {
	Integrations     map[string]Integration     `json:"integrations"`
	FileIntegrations map[string]FileIntegration `json:"file_integrations,omitempty"`
}

CollectorConfig represents the full collector configuration file.

func ReadCollectorConfig

func ReadCollectorConfig() (CollectorConfig, error)

ReadCollectorConfig reads the collector configuration from disk.

type FileIntegration

type FileIntegration struct {
	Enabled bool     `json:"enabled"`
	Paths   []string `json:"paths"`
}

FileIntegration represents a file-based log collector configuration.

type Integration

type Integration struct {
	TCP Port `json:"tcp_port,omitempty"`
	UDP Port `json:"udp_port,omitempty"`
}

Integration represents a collector integration configuration (syslog/netflow).

type Port

type Port struct {
	IsListen   bool   `json:"enabled"`
	Port       string `json:"value"`
	TLSEnabled bool   `json:"tls_enabled,omitempty"`
}

Port represents a TCP or UDP port configuration.

Jump to

Keyboard shortcuts

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