config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides configuration management for the LacyLights server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server configuration
	Port string
	Env  string

	// Database configuration
	DatabaseURL string

	// DMX configuration
	DMXUniverseCount    int
	DMXRefreshRate      int           // Hz (active)
	DMXIdleRate         int           // Hz (idle)
	DMXHighRateDuration time.Duration // Duration to stay in high rate after changes

	// Art-Net configuration
	ArtNetEnabled   bool
	ArtNetPort      int
	ArtNetBroadcast string

	// Timing monitoring
	DMXDriftThreshold int // Only warn for drifts > threshold (ms)
	DMXDriftThrottle  int // Throttle warnings (ms)

	// Non-interactive mode (for Docker/CI)
	NonInteractive bool

	// CORS configuration
	CORSOrigin string
}

Config holds all configuration values for the server.

func Load

func Load() *Config

Load loads configuration from environment variables with sensible defaults.

func (*Config) IsDevelopment

func (c *Config) IsDevelopment() bool

IsDevelopment returns true if running in development mode.

func (*Config) IsProduction

func (c *Config) IsProduction() bool

IsProduction returns true if running in production mode.

Jump to

Keyboard shortcuts

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