Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Port int PluginUUID PluginUUID RegisterEvent EventName Info string }
Config holds the launch configuration for a plugin.
func ParseConfig ¶
ParseConfig parses the configuration from the provide arguments.
type EventContext ¶
type EventContext string
EventContext is the unique identifier for an instance of an action.
type EventName ¶
type EventName string
EventName is the name of an event sent or received from a device.
type Handler ¶
type Handler interface {
HandleEvent(ctx context.Context, raw json.RawMessage) error
}
Handler is implemented to handle events.
type Plugin ¶
type Plugin interface { Handler Initialize(pluginUUID PluginUUID, publisher Publisher) }
Plugin is implemented by a plugin in order to interact with a device.
type PluginUUID ¶
type PluginUUID string
PluginUUID is the unique identifier assigned to a plugin by a device.
type Publisher ¶
type Publisher interface {
PublishEvent(raw json.RawMessage) error
}
Publisher is provided to Plugins so they can communicate with a device.
Click to show internal directories.
Click to hide internal directories.