Documentation
¶
Overview ¶
Package runtimeconfig owns the closed, versioned catalogue consumed by the running Hikyo instance. Published values are prepared without side effects.
Index ¶
- Constants
- Variables
- func EncodeNodeOverrides(nodes map[string]map[string]string) (string, error)
- func Folder(name string) string
- type Bundle
- func (b *Bundle) BootstrapSources() config.ManagedBootstrapSources
- func (b *Bundle) HasNodeValues() bool
- func (b *Bundle) MailConfigured() bool
- func (b *Bundle) NodeValues(nodeID string) (map[string]string, error)
- func (b *Bundle) OwnerValues() map[string]string
- func (b *Bundle) Send(ctx context.Context, to, subject, body string) error
- func (b *Bundle) UpdateChannel() string
- func (b *Bundle) ValidateNodeMembership(admittedNodeIDs []string) error
- type Key
- type Migration
- type PreparedActivation
- type RuntimeInstaller
Constants ¶
const MigrationVersion int64 = 6
const SchemaVersion = 1
Variables ¶
var ErrNodeNotConfigured = errors.New("managed configuration has no entry for this node")
Functions ¶
func EncodeNodeOverrides ¶
EncodeNodeOverrides creates one canonical encrypted project-cell value for the independently captured nodes. It never infers one node from another.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle contains one immutable prepared configuration. Callers atomically replace the whole bundle and retain the captured bundle for in-flight work.
func PrepareForConfig ¶
PrepareForConfig additionally proves that the owner settings fit this node's bootstrap/deployment context. It performs no activation or I/O.
func PrepareForNode ¶
PrepareForNode validates the complete candidate using this node's bootstrap identity and engine. Resource construction and activation remain app-owned.
func (*Bundle) BootstrapSources ¶
func (b *Bundle) BootstrapSources() config.ManagedBootstrapSources
BootstrapSources returns value-only installed source selections.
func (*Bundle) HasNodeValues ¶
HasNodeValues distinguishes a legacy owner-only bundle from one that declares managed node configuration. A declared document always requires exact nodes.
func (*Bundle) MailConfigured ¶
func (*Bundle) NodeValues ¶
NodeValues returns one independent complete projection, never another node's settings. Missing nodes are explicit errors, including in an owner-only bundle.
func (*Bundle) OwnerValues ¶
OwnerValues returns independent application settings only. Mail and release notifications have separate runtime owners and are omitted from this map.
func (*Bundle) Send ¶
Send uses this exact prepared bundle, including when a newer revision is activated concurrently. Runtime fencing and test budgets belong to callers.
func (*Bundle) UpdateChannel ¶
func (*Bundle) ValidateNodeMembership ¶
ValidateNodeMembership binds a candidate to the exact admitted participants. Neither unknown candidate nodes nor omitted admitted nodes are acceptable.
type Key ¶
type Key struct {
Name string
Description string
Secret bool
Classification schema.Classification
Declaration schema.Declaration
}
Key describes the runtime-owned normal project declaration. Presence is optional; Prepare enforces dependencies between the mail keys at activation.
type Migration ¶
type Migration struct {
Version int64
Name string
Default *string
// Optional adds only the declaration when no value exists. It cannot be
// combined with Default, and never removes an existing operator value.
Optional bool
}
Migration adds one release-owned setting. Versions and defaults are immutable once released. A nil Default means operator input is required unless Optional explicitly permits an absent value. Empty string is an explicit default, never absence. The declaration remains in Catalogue.
func Migrations ¶
func Migrations() []Migration
type PreparedActivation ¶
PreparedActivation owns candidate resources until Activate transfers them to the application. Close disposes an unused candidate and is idempotent; after successful activation it must not close the active application. Failed activation must leave the prior application available for recovery.
type RuntimeInstaller ¶
type RuntimeInstaller interface {
Prepare(context.Context, *Bundle) (PreparedActivation, error)
}
RuntimeInstaller prepares the application's consumers without making a candidate active. The app owns this interface; only its configuration worker invokes it, outside request and datastore transaction lifetimes.