Documentation
¶
Index ¶
- func ApplyToConfig(base *config.Config, runtime *RuntimeSettings) *config.Config
- func ValidateArrIntegrations(integrations []ArrIntegrationRuntimeSettings) error
- type ArrIntegrationRuntimeSettings
- type DownloadRuntimeSettings
- type IndexerRuntimeSettings
- type IndexingRuntimeSettings
- type RuntimeSettings
- type RuntimeSettingsPatch
- type ServerRuntimeSettings
- type Store
- func (s *Store) Close() error
- func (s *Store) ExpectedSchemaVersion() int
- func (s *Store) GetRuntimeSettings(ctx context.Context, base ...*config.Config) (*RuntimeSettings, error)
- func (s *Store) LoadEffectiveSettings(ctx context.Context, base *config.Config) (*config.Config, error)
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) RunMigrations() error
- func (s *Store) SchemaVersion(ctx context.Context) (int, error)
- func (s *Store) UpdateSettings(ctx context.Context, patch any) error
- func (s *Store) ValidateSchema(ctx context.Context) error
- func (s *Store) WatchSettingsChanges(ctx context.Context) (<-chan struct{}, error)
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 DownloadRuntimeSettings ¶
type IndexerRuntimeSettings ¶
type IndexingRuntimeSettings ¶
type RuntimeSettings ¶
type RuntimeSettings struct {
Servers []ServerRuntimeSettings `json:"servers,omitempty"`
Indexers []IndexerRuntimeSettings `json:"indexers,omitempty"`
Download *DownloadRuntimeSettings `json:"download,omitempty"`
Indexing *IndexingRuntimeSettings `json:"indexing,omitempty"`
ArrIntegrations []ArrIntegrationRuntimeSettings `json:"arr_integrations,omitempty"`
Revision int64 `json:"revision,omitempty"`
}
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 struct {
Servers *[]ServerRuntimeSettings `json:"servers,omitempty"`
Indexers *[]IndexerRuntimeSettings `json:"indexers,omitempty"`
Download *DownloadRuntimeSettings `json:"download,omitempty"`
Indexing *IndexingRuntimeSettings `json:"indexing,omitempty"`
ArrIntegrations *[]ArrIntegrationRuntimeSettings `json:"arr_integrations,omitempty"`
}
type ServerRuntimeSettings ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ExpectedSchemaVersion ¶
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) RunMigrations ¶
func (*Store) UpdateSettings ¶
patch and persist the latest runtime settings state as a new atomic revision.