config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines the doze-aws binary's runtime configuration and its defaults. Construct with Default, overlay a TOML file, then flags, then call Validate — the same flags > file > defaults model as doze-kafka.

Index

Constants

View Source
const DefaultConfigFile = "doze-aws.toml"

DefaultConfigFile is loaded automatically from the working directory when no --config flag is given and the file exists.

Variables

This section is empty.

Functions

func LoadFile

func LoadFile(path string, cfg *Config) error

LoadFile reads a TOML config file and overlays it onto cfg. Unknown keys are rejected so a typo fails loudly instead of being silently ignored.

func WriteTOML

func WriteTOML(w io.Writer, cfg Config) error

WriteTOML renders cfg as a TOML document — the effective configuration in the same shape LoadFile reads, so its output is a valid config file. Used by `doze-aws config print`.

Types

type Config

type Config struct {
	// ListenAddr is the shared endpoint every enabled service answers on.
	ListenAddr string
	// DataDir is the root data directory; each service owns a subdirectory.
	DataDir string
	// Services to enable; empty means every implemented service.
	Services []string
	// S3Host is the base host for virtual-hosted-style S3 bucket detection
	// (reserved until the s3 service lands).
	S3Host string
}

Config holds every tunable for the doze-aws binary.

func Default

func Default() Config

Default returns a Config suitable for zero-config local development. The listen port matches LocalStack's, so existing AWS_ENDPOINT_URL setups work unchanged.

func (Config) Validate

func (c Config) Validate() error

Validate reports the first problem that would prevent the binary from starting. Service-name existence is checked against the full roadmap set here; whether a service is implemented yet is the stack's concern.

Jump to

Keyboard shortcuts

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