config

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundConfig

type BackgroundConfig struct {
	Sync              string `json:"sync,omitempty"`               // "disabled" | "manual"
	ProjectionRefresh string `json:"projection_refresh,omitempty"` // "manual"
}

type CapabilityConfig

type CapabilityConfig struct {
	Enabled         bool   `json:"enabled"`
	ResourceRef     string `json:"resource_ref,omitempty"`
	MaxPayloadBytes int    `json:"max_payload_bytes,omitempty"`
	// MirrorMode is staged for the `control pull --mirror` regenerate cadence (plan reconciliation
	// ii): validated here, read when the mirror cadence lands. "manual" | "prime-refresh".
	MirrorMode string `json:"mirror_mode,omitempty"`
	RuleRef    string `json:"rule_ref,omitempty"` // "native:<id>"
}

CapabilityConfig enables and bounds one built-in capability. RuleRef ("native:<id>") selects the compiled rule kind; the assembler resolves it select-only and fails closed on an unknown id.

type ChannelConfig

type ChannelConfig struct {
	BindingFile    string `json:"binding_file,omitempty"`
	CredentialsDir string `json:"credentials_dir,omitempty"`
}

type File

type File struct {
	Local        localConfig                 `json:"local"`
	Channel      ChannelConfig               `json:"channel"`
	Capabilities map[string]CapabilityConfig `json:"capabilities"`
	Background   BackgroundConfig            `json:"background"`
}

File is the 4-layer config that drives select-only capability assembly: where the store/endpoint live (local), how the channel authenticates (channel), which built-in capabilities are enabled and bound (capabilities), and which background workers run (background). It enables/binds/limits already-compiled capabilities; it can never define new behavior (the assembler is fail-closed).

func Load

func Load(path string) (File, error)

Load reads and validates a config File. It is fail-closed: an unknown field anywhere in the document is rejected (DisallowUnknownFields), and an enabled capability must carry a native rule_ref and a known mirror_mode.

Jump to

Keyboard shortcuts

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