Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandHandler ¶
type CommandHandler struct {
Command string
Handler func(p []byte) (*messages.Result, codes.PluginExitReason, error)
}
CommandHandler binds a command name (message type) to its handler function.
The handler receives raw CBOR-encoded data from the host, decodes it, and returns a result along with an appropriate exit code and optional error.
This structure is used by plugkit.CreateAndRunPlug() to register handlers declaratively.
Click to show internal directories.
Click to hide internal directories.