remote

package
v0.0.0-...-86f3bae Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyPins

func KeyPins() keys.Pins

func LedPins

func LedPins(ledState chan LedState) led.Pins

func NewWebsocketEndpoint

func NewWebsocketEndpoint(input chan Message, output chan Message) http.HandlerFunc

func StartServer

func StartServer(ctx context.Context) (led.Pins, keys.Pins, display.UpdateChannel, chan string)

Types

type KeyStateReceiver

type KeyStateReceiver chan bool

func Key

func Key() KeyStateReceiver

func (KeyStateReceiver) IsKeyPressed

func (k KeyStateReceiver) IsKeyPressed() bool

type LedState

type LedState struct {
	Name  string
	State bool
}

type LedStateNotifier

type LedStateNotifier struct {
	Name   string
	Update chan LedState
}

func (LedStateNotifier) High

func (l LedStateNotifier) High()

func (LedStateNotifier) Low

func (l LedStateNotifier) Low()

type Message

type Message struct {
	Action string `json:"action"`
	Data   string `json:"data"`
}

type MessageBuffer

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

Jump to

Keyboard shortcuts

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