Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Connection Connection `mapstructure:"connection" validate:"required"` Logging Logging `mapstructure:"logging" validate:"required"` Dimming Dimming `mapstructure:"dimming" validate:"required"` }
func ReadConfig ¶
func ReadConfig() *Config
type Connection ¶
type Controller ¶
type Controller struct { SamplePeriod *float64 `mapstructure:"samplePeriod" validate:"required"` Percentile *string `mapstructure:"percentile" validate:"oneof=p50 p75 p95"` Setpoint *float64 `mapstructure:"setpoint" validate:"required"` Kp *float64 `mapstructure:"kp" validate:"required"` Ki *float64 `mapstructure:"ki" validate:"required"` Kd *float64 `mapstructure:"kd" validate:"required"` }
type DimmableComponent ¶
type DimmableComponent struct { Method MatchableMethod `mapstructure:"method" validate:"required"` Path *string `mapstructure:"path" validate:"required"` // Probability is a pointer as probabilities will be set to an external // default if it is nil. Probability *float64 `mapstructure:"probability"` Exclusions []Exclusions `mapstructure:"exclusions"` }
type Dimming ¶
type Dimming struct { Enabled *bool `mapstructure:"enabled" validate:"required"` DimmableComponents []DimmableComponent `mapstructure:"dimmableComponents" validate:"required"` Controller Controller `mapstructure:"controller" validate:"required"` Profiler Profiler `mapstructure:"profiler" validate:"required"` }
type Exclusions ¶
type MatchableMethod ¶
type MatchableMethod struct { ShouldMatchAll *bool `mapstructure:"shouldMatchAll" validate:"required_without=Method"` // Method must be set if ShouldMatchAll is false. If ShouldMatchAll is true, // Method is ignored. Method *string `mapstructure:"method" validate:"required_without=ShouldMatchAll required_if=ShouldMatchAll false"` }
type Probabilities ¶
type Profiler ¶
type Profiler struct { Enabled *bool `mapstructure:"enabled" validate:"required"` SessionCookie *string `mapstructure:"sessionCookie" validate:"required"` InfluxDB InfluxDB `mapstructure:"influxdb" validate:"required"` Redis Redis `mapstructure:"redis" validate:"required"` Probabilities Probabilities `mapstructure:"probabilities" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.