config

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package config manages RouterConfiguration persisted in the instance_settings row.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service manages RouterConfiguration.

func New

func New(sqlite *db.Database) *Service

New constructs a config Service on the SQLite handle.

func (*Service) GetSettings added in v0.4.0

func (s *Service) GetSettings(ctx context.Context) (models.RouterConfiguration, error)

GetSettings returns the stored RouterConfiguration from instance_settings. A missing row returns the zero configuration, matching the previous behavior.

func (*Service) PutSettings added in v0.4.0

func (s *Service) PutSettings(ctx context.Context, configuration models.RouterConfiguration) error

PutSettings validates and persists RouterConfiguration to instance_settings. One transaction reads the row and upserts the merged record through the transaction handle only.

func (*Service) SetLogger added in v0.4.0

func (s *Service) SetLogger(l *slog.Logger)

SetLogger wires structured logging.

Jump to

Keyboard shortcuts

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