config

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvOrDefault

func GetEnvOrDefault(key, defaultValue string) string

GetEnvOrDefault returns environment variable or default value

func LoadFromEnv

func LoadFromEnv(cfg *Config)

LoadFromEnv loads configuration from environment variables

Types

type BackendConfig

type BackendConfig struct {
	Type     string                 `yaml:"type"`
	Endpoint string                 `yaml:"endpoint"`
	Options  map[string]interface{} `yaml:"options"`
}

type CacheConfig

type CacheConfig struct {
	MemorySize int64  `yaml:"memory_size"` // 256GB RAM on your hub
	SSDPath    string `yaml:"ssd_path"`    // "/mnt/nvme/cache"
	SSDSize    int64  `yaml:"ssd_size"`    // 8TB NVMe on your hub
	Algorithm  string `yaml:"algorithm" default:"lru"`
}

type Config

type Config struct {
	Server   ServerConfig             `yaml:"server"`
	Engine   EngineConfig             `yaml:"engine"`
	Pipeline PipelineConfig           `yaml:"pipeline"`
	Events   EventConfig              `yaml:"events"`
	Cache    CacheConfig              `yaml:"cache"`
	Backends map[string]BackendConfig `yaml:"backends"`
}

type EngineConfig

type EngineConfig struct {
	MaxOperations int  `yaml:"max_operations" default:"1000"`
	EnableQuery   bool `yaml:"enable_query" default:"false"`
	EnableCompute bool `yaml:"enable_compute" default:"false"`
}

type EventConfig

type EventConfig struct {
	Enabled       bool          `yaml:"enabled" default:"true"`
	BufferSize    int           `yaml:"buffer_size" default:"10000"`
	FlushInterval time.Duration `yaml:"flush_interval" default:"1m"`
}

type PipelineConfig

type PipelineConfig struct {
	Stages []string `yaml:"stages"` // ["compress", "encrypt"] for MVP
}

type ServerConfig

type ServerConfig struct {
	Port        int    `yaml:"port" default:"8080"`
	MetricsPort int    `yaml:"metrics_port" default:"9090"`
	LogLevel    string `yaml:"log_level" default:"info"`
}

Jump to

Keyboard shortcuts

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