config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config manages RouterConfiguration persisted in the RouterConfiguration bucket.

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(database *db.DB) *Service

New constructs a config Service.

func (*Service) Get

Get returns the stored RouterConfiguration. Fields that were never persisted (old rows predate them) fall back to defaults: zero is never a valid value for the ranged fields, so normalizing it is safe.

func (*Service) Put

Put validates and persists RouterConfiguration.

func (*Service) SetOnChanged

func (s *Service) SetOnChanged(fn func(models.RouterConfiguration))

SetOnChanged registers a callback invoked after a successful Put.

Jump to

Keyboard shortcuts

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