schema

package
v0.0.0-...-221c3f5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: AGPL-3.0 Imports: 5 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 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