Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AdapterList *list.List = list.New()
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// Name of the adapter
Name string
// Version of the adapter
Version string
// Description of the adapter
Description string
// Start the adapter, will be run as a goroutine
Start func()
// Finalize the adapter, will be run after everything
Finalize func()
// Will automatically initialize when LoadAdapter is called
ReceiveChannel message.MessageChannel
SendChannel message.MessageChannel
ActionChannel message.ActionChannel
}
Implement this to create an adapter
func (*Adapter) CallAction ¶
func (a *Adapter) CallAction(action *message.ActionCall) (result any)
CallAction will call the adapter action and wait for the result, the result should be nil if error or ignored
Your adapter must push result to the ResultChannel! ¶
Otherwise the plugin handler would stuck! ¶
🫵 I warn you! ¶
func (*Adapter) SendMessage ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.