Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelPublisher ¶
ChannelPublisher defines an interface that sends an io.Reader interface to a consumer
type ChannelStore ¶
ChannelStore defines a map of channel names to the channel that will send/receivers readers
func (*ChannelStore) PublishReader ¶
func (s *ChannelStore) PublishReader(name string, reader io.Reader) error
PublishReader publishes an instance of an io.Reader to a channel it owns.
type DeviceChannels ¶
type DeviceChannels struct { Commands ReadStream Feedback WriteStream Registrations device.RegistrationStream }
DeviceChannels is a convenience structure containing a ReadStream, WriteStream and RegistrationStream
type DeviceControlProcessor ¶
The DeviceControlProcessor is used by the server to maintain the pool of websocket connections, register new device connections w/ the index and relay any messages along to the device.
func NewDeviceControlProcessor ¶
func NewDeviceControlProcessor(c *DeviceChannels, s device.Index, k *security.ServerKey) *DeviceControlProcessor
NewDeviceControlProcessor returns a new DeviceControlProcessor
func (*DeviceControlProcessor) Start ¶
func (processor *DeviceControlProcessor) Start(wg *sync.WaitGroup, stop KillSwitch)
Start will continuously loop over registration & command channels delegating to private methods as necessary.
type DeviceFeedbackProcessor ¶
DeviceFeedbackProcessor is responsible for receiving from the device feedback stream
func NewDeviceFeedbackProcessor ¶
func NewDeviceFeedbackProcessor(feedback ReadStream) *DeviceFeedbackProcessor
NewDeviceFeedbackProcessor is responsible for receiving from the device feedback stream
func (*DeviceFeedbackProcessor) Start ¶
func (processor *DeviceFeedbackProcessor) Start(wg *sync.WaitGroup, stop KillSwitch)
Start is the Processor#Start implementation
type Processor ¶
type Processor interface {
Start(*sync.WaitGroup, KillSwitch)
}
Processor is an interface that defines a background-task with async safeguards
type ReadStream ¶
ReadStream defines a receive-only channel for io.Reader types
type WriteStream ¶
WriteStream defines a send-only channel for io.Reader types