config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 7 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 {
	ID       string `yaml:"id"`
	StateDir string `yaml:"state_dir"`
	LogLevel string `yaml:"log_level"`
}

AgentConfig contains agent-level settings

type Config

type Config struct {
	Agent   AgentConfig   `yaml:"agent"`
	Santa   SantaConfig   `yaml:"santa"`
	Rules   RulesConfig   `yaml:"rules"`
	State   StateConfig   `yaml:"state"`
	Shipper ShipperConfig `yaml:"shipper"`
}

Config represents the complete santamon configuration

func Load

func Load(path string) (*Config, error)

Load reads and parses the configuration file

func LoadForReadOnly

func LoadForReadOnly(path string) (*Config, error)

LoadForReadOnly loads config without validating shipper (for status/db commands)

func LoadWithOptions

func LoadWithOptions(path string, skipShipperValidation bool) (*Config, error)

LoadWithOptions reads configuration with optional validation skips

func (*Config) Validate

func (c *Config) Validate() error

Validate checks the configuration for errors

func (*Config) ValidateWithOptions

func (c *Config) ValidateWithOptions(skipShipper bool) error

ValidateWithOptions checks configuration with optional validation skips

type FirstSeenConfig

type FirstSeenConfig struct {
	MaxEntries int    `yaml:"max_entries"`
	Eviction   string `yaml:"eviction"`
}

FirstSeenConfig defines first-seen tracking settings

type HeartbeatConfig

type HeartbeatConfig struct {
	Enabled  bool          `yaml:"enabled"`
	Interval time.Duration `yaml:"interval"`
}

HeartbeatConfig defines agent heartbeat settings

type RetryConfig

type RetryConfig struct {
	MaxAttempts int           `yaml:"max_attempts"`
	Backoff     string        `yaml:"backoff"`
	Initial     time.Duration `yaml:"initial"`
	Max         time.Duration `yaml:"max"`
}

RetryConfig defines retry behavior

type RulesConfig

type RulesConfig struct {
	Path     string `yaml:"path"`
	ReloadOn string `yaml:"reload_on"`
}

RulesConfig defines detection rules settings

type SantaConfig

type SantaConfig struct {
	Mode          string        `yaml:"mode"`
	SpoolDir      string        `yaml:"spool_dir"`
	ArchiveDir    string        `yaml:"archive_dir"`
	StabilityWait time.Duration `yaml:"stability_wait"`
}

SantaConfig defines Santa spool settings

type ShipperConfig

type ShipperConfig struct {
	Endpoint       string          `yaml:"endpoint"`
	APIKey         string          `yaml:"api_key"`
	BatchSize      int             `yaml:"batch_size"`
	FlushInterval  time.Duration   `yaml:"flush_interval"`
	Timeout        time.Duration   `yaml:"timeout"`
	Retry          RetryConfig     `yaml:"retry"`
	FlushOnEnqueue *bool           `yaml:"flush_on_enqueue"`
	TLSSkipVerify  bool            `yaml:"tls_skip_verify"`
	Heartbeat      HeartbeatConfig `yaml:"heartbeat"`
}

ShipperConfig defines signal shipping settings

type StateConfig

type StateConfig struct {
	DBPath          string          `yaml:"db_path"`
	SyncWrites      bool            `yaml:"sync_writes"`
	CompactInterval time.Duration   `yaml:"compact_interval"`
	FirstSeen       FirstSeenConfig `yaml:"first_seen"`
	Windows         WindowsConfig   `yaml:"windows"`
}

StateConfig defines database settings

type WindowsConfig

type WindowsConfig struct {
	GCInterval time.Duration `yaml:"gc_interval"`
	MaxEvents  int           `yaml:"max_events"`
}

WindowsConfig defines correlation window settings

Jump to

Keyboard shortcuts

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