Documentation
¶
Index ¶
Constants ¶
View Source
const ( SwitchMachineAdded = 0 SwitchMachineRemoved = 1 SwitchMachinePositionChanged = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
//Start checking for updates
Start(DriverEventListener)
UpdateSwitchMachine(switchmachine.State)
io.Closer
}
type DriverEvent ¶
type DriverEvent interface {
Type() DriverEventType
Id() switchmachine.Id
//Could be nil
State() switchmachine.State
}
func NewSwitchMachineAddedEvent ¶
func NewSwitchMachineAddedEvent(id switchmachine.Id, state switchmachine.State) DriverEvent
func NewSwitchMachinePositionChangedEvent ¶
func NewSwitchMachinePositionChangedEvent(id switchmachine.Id, state switchmachine.State) DriverEvent
func NewSwitchMachineRemovedEvent ¶
func NewSwitchMachineRemovedEvent(id switchmachine.Id) DriverEvent
type DriverEventListener ¶
type DriverEventListener interface {
HandleDriverEvent(DriverEvent)
}
type DriverEventType ¶
type DriverEventType uint8
Click to show internal directories.
Click to hide internal directories.