live

package
v0.0.0-...-09da918 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LightsController

type LightsController interface {
	Set(addr internal.LightAddress, isON bool) error
	Reset() error
}

type Live

type Live struct {
	// contains filtered or unexported fields
}

func New

func New(l LightsController, mapping [][]internal.Light, opts Options) *Live

func (*Live) Name

func (l *Live) Name() string

func (*Live) Start

func (l *Live) Start(ctx context.Context) error

func (*Live) Stop

func (l *Live) Stop()

type Options

type Options struct {
	MaxDelay   time.Duration `long:"max-delay" env:"MAX_DELAY" default:"30s" description:"max delay between flat selection"`
	FlatTTL    time.Duration `long:"flat-ttl" env:"FLAT_TTL" default:"5h" description:"flat live time"`
	ServiceTTL time.Duration `long:"service-ttl" env:"SERVICE_TTL" default:"20s" description:"service live time"`
	MaxChanges uint          `long:"max-changes" env:"MAX_CHANGES" default:"25" description:"max changes in flat per window"`
}

Jump to

Keyboard shortcuts

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