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

config_runtime

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package config_runtime provides a host-enabled runtime config file loader. Unlike @config.load, it returns structured values to the executing pipeline. The host must supply the trusted file root; flow source cannot set it.

Typical host setup:

bundle, err := config_runtime.BundleWithRoot("/etc/myapp/config")

Typical flow use:

{} -> config_runtime.load @{ path: "settings.json" } -> AppConfig.validate

Index

Constants

View Source
const ID = "config_runtime"

Variables

This section is empty.

Functions

func Bundle

func Bundle(_ map[string]string) compiler.Bundle

Bundle is the source-level @require factory. It intentionally does not accept filesystem roots from flow source; only a host may provide the trusted root through BundleWithRoot.

func BundleWithRoot

func BundleWithRoot(rootPath string) (compiler.Bundle, error)

BundleWithRoot enables the runtime loader for a host using an explicit, trusted directory. Paths supplied to config_runtime.load are always relative to this root. The host owns the returned bundle and should run its Shutdowns after the runner invocation completes.

Types

type LoadRequest

type LoadRequest struct {
	Path string `json:"path" validate:"required"`
}

LoadRequest names one file relative to the host-configured root.

Jump to

Keyboard shortcuts

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