config

package
v1.234.0-rc.2 Latest Latest
Warning

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

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

Documentation

Overview

Package config implements typed configuration records, inline schema helpers, JSON Schema loading, and immutable deep merging for automation scripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(host Host) starlark.Value

New constructs the config namespace using the host's file and path services. Cancellation comes from the context attached to each calling thread.

func Schema

func Schema() starlark.Value

Schema returns the immutable inline schema constructors.

Types

type Host

type Host struct {
	// ReadFile supplies configuration and local schema contents.
	ReadFile func(string) ([]byte, error)
	// ResolvePath resolves a path relative to the calling Starlark file.
	ResolvePath func(*starlark.Thread, string) string
	// HTTPClient optionally supplies the transport and a shorter request timeout.
	// The binding copies the client and enforces its own HTTPS redirect policy.
	HTTPClient *http.Client
}

Host supplies runtime services without exposing the automation session. Callbacks and HTTP transports must be safe for concurrent use.

Jump to

Keyboard shortcuts

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