web

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowController

type FlowController interface {
	SelectFlow(ctx context.Context, name string) error
	FlowNames() []string
	Active() string
}

type Server

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

Server deals with all incomming requests and performs calls to the various internal subsystems NB: Page generated base on mapping defined in internal/mapping.go

func NewServer

func NewServer(l lights.ControllerI, f FlowController, snap Snapshoter, mapping [][]internal.Light) (*Server, error)

func (*Server) Listen

func (s *Server) Listen(ctx context.Context, addr string) error

func (*Server) NotifyViaSSE

func (s *Server) NotifyViaSSE(ctx context.Context) error

type Snapshoter

type Snapshoter interface {
	Snapshot() error
}

Jump to

Keyboard shortcuts

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