factory

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBridgesProvider

func CreateBridgesProvider(
	url string,
	id string,
	token pkg.Token,
) pkg.BridgesProvider

func CreateCheckController

func CreateCheckController(
	url string,
	id string,
	token pkg.Token,
	inverval time.Duration,
	summerMode bool,
	dryRun bool,
	currentDateTimeGetter libtime.CurrentDateTimeGetter,
	location *time.Location,
	sunriseSunsetProvider pkg.SunriseSunsetProvider,
	samplerFactory log.SamplerFactory,
) run.Func

CreateCheckController wires the check controller, threading the sampler factory through to the checks cron so its failure warning is sampled.

func CreateListLightsHandler

func CreateListLightsHandler(bridgesProvider pkg.BridgesProvider) http.Handler

CreateListLightsHandler wraps handler.NewListLightsHandler with the canonical libhttp error handler so it can be mounted on a mux.Router.

func CreateSetLogLevelHandler added in v0.5.0

func CreateSetLogLevelHandler(levelVar *slog.LevelVar) http.Handler

CreateSetLogLevelHandler wraps handler.NewSetLogLevelHandler with the controller's default level (Debug, matching the LOGLEVEL=2 deployment) and the 5-minute auto-reset so it can be mounted on a mux.Router.

func CreateStatusHandler

func CreateStatusHandler(bridgesProvider pkg.BridgesProvider) http.Handler

CreateStatusHandler wraps handler.NewStatusHandler with the canonical libhttp error handler so it can be mounted on a mux.Router.

Types

This section is empty.

Jump to

Keyboard shortcuts

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