config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIServerModeHTTP = "http"
	APIServerModeGRPC = "grpc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug                    bool   `yaml:"debug"`
	BPFProgramPath           string `yaml:"bpf_program_path"`
	BPFPinPath               string `yaml:"bpf_pin_path"`
	SettingsDBPath           string `yaml:"db_path"`
	ManagementBootstrapToken string `yaml:"management_bootstrap_token"`
	APIListenAddr            string `yaml:"api_listen_addr"`
	APIServerMode            string `yaml:"api_server_mode"`
	ShutdownTimeoutSec       int    `yaml:"shutdown_timeout_sec"`
	CrtPath                  string `yaml:"crt_path"`
	KeyPath                  string `yaml:"key_path"`

	ConfigPath string
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) ConfigureLogger

func (cfg *Config) ConfigureLogger()

ConfigureLogger конфигурирует логгер.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate валидирует прочитанных значений конфигурации.

Jump to

Keyboard shortcuts

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