settings

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyToConfig

func ApplyToConfig(base *config.Config, runtime *RuntimeSettings) *config.Config

apply runtime-editable settings on top of bootstrap config.

func ValidateArrIntegrations

func ValidateArrIntegrations(integrations []ArrIntegrationRuntimeSettings) error

Types

type ArrIntegrationRuntimeSettings

type ArrIntegrationRuntimeSettings = app.ArrIntegrationRuntimeSettings

type DownloadRuntimeSettings

type DownloadRuntimeSettings = app.DownloadRuntimeSettings

type IndexerRuntimeSettings

type IndexerRuntimeSettings = app.IndexerRuntimeSettings

type IndexingRuntimeSettings

type IndexingRuntimeSettings = app.IndexingRuntimeSettings

type RuntimeSettings

type RuntimeSettings = app.RuntimeSettings

runtime-editable settings model for Milestone 8.X chunk 1. Bootstrap-only fields stay in config.yaml/env and are not represented here.

func ApplyPatch

func ApplyPatch(current *RuntimeSettings, patch *RuntimeSettingsPatch) *RuntimeSettings

exported patch helper for admin API preview/validation path.

func CloneRuntimeSettings

func CloneRuntimeSettings(in *RuntimeSettings) *RuntimeSettings

explicit clone used when persisting a validated full snapshot.

func FromConfig

func FromConfig(cfg *config.Config) *RuntimeSettings

derive editable runtime state from current effective config.

func RedactedCopy

func RedactedCopy(in *RuntimeSettings) *RuntimeSettings

redact runtime secrets before returning settings through API.

type RuntimeSettingsPatch

type RuntimeSettingsPatch = app.RuntimeSettingsPatch

type ServerRuntimeSettings

type ServerRuntimeSettings = app.ServerRuntimeSettings

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(dbPath string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) ExpectedSchemaVersion

func (s *Store) ExpectedSchemaVersion() int

func (*Store) GetRuntimeSettings

func (s *Store) GetRuntimeSettings(ctx context.Context, base ...*config.Config) (*RuntimeSettings, error)

return the latest persisted runtime settings revision. If no row exists yet, fall back to bootstrap-derived defaults.

func (*Store) LoadEffectiveSettings

func (s *Store) LoadEffectiveSettings(ctx context.Context, base *config.Config) (*config.Config, error)

load latest runtime settings revision and overlay it onto bootstrap config.

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

func (*Store) RunMigrations

func (s *Store) RunMigrations() error

func (*Store) SchemaVersion

func (s *Store) SchemaVersion(ctx context.Context) (int, error)

func (*Store) UpdateSettings

func (s *Store) UpdateSettings(ctx context.Context, next *RuntimeSettings) error

patch and persist the latest runtime settings state as a new atomic revision.

func (*Store) ValidateSchema

func (s *Store) ValidateSchema(ctx context.Context) error

func (*Store) WatchSettingsChanges

func (s *Store) WatchSettingsChanges(ctx context.Context) (<-chan struct{}, error)

poll settings_revision for new ids and publish a lightweight signal. This is intentionally simple for the first live-reload slice.

Jump to

Keyboard shortcuts

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