input

package
v0.0.0-...-73beaae Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleReader

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

ConsoleReader will read text from the console, convert it into `messages.Instruction` types and emit them into a read queue

func NewConsoleReader

func NewConsoleReader(providedQueue chan<- message.Instruction) *ConsoleReader

NewConsoleReader will return a console reader configured to emit messages on the provided `messages.Instruction` channel

func (*ConsoleReader) CreateInstruction

func (c *ConsoleReader) CreateInstruction(text string) (message.Instruction, error)

CreateInstruction creates a device.Instruction from the specified text input

func (*ConsoleReader) Start

func (c *ConsoleReader) Start()

Start starts the console reader. This should be wrapped in a gofunc TODO should probably use readrune and define a tokenizer or something

func (*ConsoleReader) Stop

func (c *ConsoleReader) Stop()

Stop will shut down the console reader

type Readable

type Readable interface {
	Start()
	Stop()
}

Readable defines an interface which anything that can consume control signals should satisfy.

Jump to

Keyboard shortcuts

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