config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFilePatterns

func DefaultFilePatterns() []string

DefaultFilePatterns returns a copy of the default discovery patterns.

Types

type Config

type Config struct {
	DuckDB struct {
		Path string `mapstructure:"path"`
	} `mapstructure:"duckdb"`

	Parser struct {
		SlowLogDir   string   `mapstructure:"slow_log_dir"`
		BatchSize    int      `mapstructure:"batch_size"`
		FilePatterns []string `mapstructure:"file_patterns"`
		Workers      int      `mapstructure:"workers"`
	} `mapstructure:"parser"`

	API struct {
		Host   string `mapstructure:"host"`
		Port   int    `mapstructure:"port"`
		APIKey string `mapstructure:"api_key"`
	} `mapstructure:"api"`
}

Config represents the application configuration

func Load

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

Load loads configuration from file and environment variables

func (*Config) GetAPIAddr

func (c *Config) GetAPIAddr() string

GetAPIAddr returns the API server address

func (*Config) GetDSN

func (c *Config) GetDSN() string

GetDSN returns the DuckDB connection string

Jump to

Keyboard shortcuts

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