config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArcConfig

type ArcConfig struct {
	ConnectTimeout       int
	QueryTimeout         int
	WriteBatchSize       int
	WriteFlushIntervalMS int
}

ArcConfig holds the global timing/batch knobs shared by every Arc client. Per-org URL, API key, database, and measurement are stored in the metadata DB (see internal/metadata/arc_instances.go) and configured via the admin CLI.

type AuthConfig

type AuthConfig struct {
	Enabled bool
	DBPath  string
}

type Config

type Config struct {
	Server ServerConfig
	Log    LogConfig
	Arc    ArcConfig
	Auth   AuthConfig
	Dedup  DedupConfig

	// LegacyArc carries the deprecated flat [arc] block fields. Populated only
	// for one-shot auto-migration into the metadata DB on first startup. Once
	// arc_instances is non-empty these fields are ignored.
	LegacyArc LegacyArcConfig
}

Config holds all configuration for memtrace

func Load

func Load() (*Config, error)

Load loads configuration from file and environment

type DedupConfig

type DedupConfig struct {
	Enabled     bool
	WindowHours int
}

type LegacyArcConfig

type LegacyArcConfig struct {
	URL         string
	APIKey      string
	Database    string
	Measurement string
}

LegacyArcConfig is the pre-multi-tenant flat [arc] block. Read for migration only and removed in a future release once the migration code is deleted.

type LogConfig

type LogConfig struct {
	Level  string
	Format string
}

type ServerConfig

type ServerConfig struct {
	Host            string
	Port            int
	ReadTimeout     int
	WriteTimeout    int
	ShutdownTimeout int
}

Jump to

Keyboard shortcuts

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