config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 6 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.

View Source
const DefaultStackFile = "stack.yaml"

DefaultStackFile is applied at boot when present and no --stack names one.

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
	// Console mounts the web management UI at /_console on the shared endpoint.
	Console bool
	// LambdaIdleTimeout is how long a warm Lambda function keeps its process(es)
	// before scaling to zero.
	LambdaIdleTimeout time.Duration
	// StackFile is a declarative stack.yaml applied at boot (and the default
	// target of `doze-aws apply`). Empty auto-detects ./stack.yaml.
	StackFile 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