Documentation
¶
Index ¶
- func CreateBridgesProvider(url string, id string, token pkg.Token) pkg.BridgesProvider
- func CreateCheckController(url string, id string, token pkg.Token, inverval time.Duration, ...) run.Func
- func CreateListLightsHandler(bridgesProvider pkg.BridgesProvider) http.Handler
- func CreateSetLogLevelHandler(levelVar *slog.LevelVar) http.Handler
- func CreateStatusHandler(bridgesProvider pkg.BridgesProvider) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBridgesProvider ¶
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
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.
Click to show internal directories.
Click to hide internal directories.