Help us shape the future of Go! Take the 2026 Go Developer Survey

configrender

package
v0.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package configrender composes and resolves an aggkit configuration file using the same pipeline as the aggkit binary (config.ConfigRender), but allowing each default layer to be overridden or skipped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFileData

func BuildFileData(opts Options) ([]config.FileData, error)

BuildFileData reads every layer and returns them in merge order.

func LoadDeprecatedFields

func LoadDeprecatedFields(path string) ([]config.DeprecatedField, error)

LoadDeprecatedFields reads a TOML file of "pattern" = "reason" entries. A pattern ending with a dot, or naming a section, matches everything under it.

func Render

func Render(opts Options) (string, error)

Render composes all layers and resolves the variables. On failure the error wraps config.ErrMissingVars or config.ErrCycleVars when applicable.

Types

type Options

type Options struct {
	// DefaultValuesFile overrides config.DefaultValues when not empty.
	DefaultValuesFile string
	// DefaultVarsFile overrides config.DefaultVars when not empty.
	DefaultVarsFile string
	// MandatoryVarsFile overrides config.DefaultMandatoryVars when not empty.
	MandatoryVarsFile string
	// UseDefaultMandatoryVars uses config.DefaultMandatoryVars
	// (ignored if MandatoryVarsFile is set).
	UseDefaultMandatoryVars bool
	// ConfigFiles are the user config files, merged in order.
	ConfigFiles []string
	// DeprecatedFieldsFile is a TOML file mapping a field pattern to its reason
	// (e.g. "AggSender.URLRPCL2" = "use L2URL"). Replaces config.DefaultDeprecatedFields.
	DeprecatedFieldsFile string
	// UseDefaultDeprecatedFields checks against aggkit's deprecated fields
	// (ignored if DeprecatedFieldsFile is set).
	UseDefaultDeprecatedFields bool
	// EnvPrefix is the prefix for env var overrides (default config.EnvVarPrefix).
	EnvPrefix string
}

Options describes the layers to compose. Layers are merged in this order (later ones override earlier ones): mandatory vars, vars, values, config files.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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