Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plug ¶ added in v0.0.3
type Plug struct {
Handlers map[string]func([]byte) (result *messages.Result, exitReason codes.PluginExitReason, e error)
// contains filtered or unexported fields
}
Plug is a most standard type of plug. It supports one-off comand.
func (*Plug) Finish ¶ added in v0.0.3
func (h *Plug) Finish(message string, code codes.PluginExitReason)
Finish sends confirmation message and exits the plugin
func (*Plug) HandleMessageType ¶ added in v0.0.3
func (h *Plug) HandleMessageType(name string, handler func([]byte) (*messages.Result, codes.PluginExitReason, error))
HandleMessageType registers a function that decodes a message of particular type to process it
Click to show internal directories.
Click to hide internal directories.