config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalibrationConfig

type CalibrationConfig struct {
	Enabled              bool          `yaml:"enabled"`
	Schedule             string        `yaml:"schedule"`
	BatchSize            int           `yaml:"batch_size"`
	MinFeedbackThreshold int           `yaml:"min_feedback_threshold"`
	DecayRate            float64       `yaml:"decay_rate"`
	RecencyDecayDays     int           `yaml:"recency_decay_days"`
	MaxFrequencyBoost    float64       `yaml:"max_frequency_boost"`
	CalibrationTimeout   time.Duration `yaml:"calibration_timeout"`
}

CalibrationConfig holds confidence calibration settings.

type Config

type Config struct {
	Redis       RedisConfig       `yaml:"redis"`
	MCP         MCPConfig         `yaml:"mcp"`
	Logging     LoggingConfig     `yaml:"logging"`
	Calibration CalibrationConfig `yaml:"calibration"`
}

Config holds all application configuration for the simplified server.

func Load

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

Load reads configuration from a YAML file and applies environment overrides.

func LoadFromEnv

func LoadFromEnv() *Config

LoadFromEnv creates a config purely from environment variables.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid.

type LoggingConfig

type LoggingConfig struct {
	Level  string `yaml:"level"`
	Format string `yaml:"format"`
}

LoggingConfig holds logging settings.

type MCPConfig

type MCPConfig struct {
	Name    string `yaml:"name"`
	Version string `yaml:"version"`
}

MCPConfig holds MCP server information.

type RedisConfig

type RedisConfig struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

RedisConfig holds Redis connection configuration.

Jump to

Keyboard shortcuts

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