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

runtimeconfig

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package runtimeconfig contains bounded deployment configuration helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexKey

func HexKey(name string, size int) ([]byte, error)

func OpenCleanup

func OpenCleanup(ctx context.Context, routes []CleanupRoute) (*cortex.Generations, func(), error)

OpenCleanup binds existing destination identities without an embedding provider, provisioning, consumer registration or selection of active indexes.

func OpenLexical

func OpenLexical(ctx context.Context, routes []LexicalRoute) (*cortex.Generations, func(), error)

OpenLexical never provisions a database or selects an active generation.

func Read

func Read(path string, destination any) error

func ValidateCleanupRoutes

func ValidateCleanupRoutes(routes []CleanupRoute) error

func ValidateRoutes

func ValidateRoutes(routes []LexicalRoute) error

Types

type AttestationIdentity

type AttestationIdentity struct {
	URL                         string `json:"url"`
	Authority                   string `json:"authority"`
	TokenEnv                    string `json:"token_env"`
	RootCAFile                  string `json:"root_ca_file,omitempty"`
	TimeoutSeconds              int    `json:"timeout_seconds"`
	MaxAuthenticationAgeSeconds int    `json:"max_authentication_age_seconds"`
}

func (*AttestationIdentity) Open

func (*AttestationIdentity) Validate

func (c *AttestationIdentity) Validate() error

type CleanupRoute

type CleanupRoute struct {
	LexicalRoute
	EmbeddingID string `json:"embedding_id"`
	Dimensions  int    `json:"dimensions"`
}

type ExtractionScheduling

type ExtractionScheduling struct {
	Profiles                []model.ExtractionProfile `json:"profiles"`
	RedactionPolicyVersions []string                  `json:"redaction_policy_versions,omitempty"`
	MaxConcurrentPerTenant  int                       `json:"max_concurrent_per_tenant"`
	DailyTokenBudget        int64                     `json:"daily_token_budget"`
	CostUnit                string                    `json:"cost_unit,omitempty"`
	DailyCostBudgetUnits    int64                     `json:"daily_cost_budget_units,omitempty"`
}

ExtractionScheduling contains approved profiles, never provider implementations or credentials. The engine performs full profile validation before serving.

func (*ExtractionScheduling) Options

func (*ExtractionScheduling) Validate

func (c *ExtractionScheduling) Validate() error

type LexicalRoute

type LexicalRoute struct {
	Tenant         string `json:"tenant"`
	Generation     string `json:"generation"`
	DatabaseEnv    string `json:"database_env"`
	MaxConnections int    `json:"max_connections"`
}

type RuntimeTelemetry

type RuntimeTelemetry struct {
	Options model.TelemetryOptions
	Metrics *sdkmetric.MeterProvider
	// contains filtered or unexported fields
}

func StartTelemetry

func StartTelemetry(ctx context.Context, c *Telemetry, service string, logger *slog.Logger) (*RuntimeTelemetry, error)

StartTelemetry is used only by explicit runtime composition, not engine constructors. Providers, SDK workers and the transport are owned by the result.

func (*RuntimeTelemetry) Close

func (r *RuntimeTelemetry) Close(logger *slog.Logger)

func (*RuntimeTelemetry) Shutdown

func (r *RuntimeTelemetry) Shutdown(ctx context.Context) error

type Telemetry

type Telemetry struct {
	Endpoint               string  `json:"endpoint"`
	RootCAFile             string  `json:"root_ca_file,omitempty"`
	TokenEnv               string  `json:"token_env,omitempty"`
	AllowPlaintextLoopback bool    `json:"allow_plaintext_loopback,omitempty"`
	ExportTimeoutSeconds   int     `json:"export_timeout_seconds"`
	MetricIntervalSeconds  int     `json:"metric_interval_seconds"`
	TraceSampleRatio       float64 `json:"trace_sample_ratio"`
}

Telemetry configures an explicitly started runtime's OTLP/HTTP collector. Credentials come from the named environment variable, never JSON config.

func (*Telemetry) Validate

func (c *Telemetry) Validate() error

Jump to

Keyboard shortcuts

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