more plugin doc updates (#7767)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
71dd21ef3d
Коммит
d2cff9b77c
@@ -7,10 +7,10 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Hooks represents an object that handles events for a plugin. Methods are likely to be added over
|
||||
// time, and plugins are not expected to implement all of them. Instead, plugins are expected to
|
||||
// implement a subset of them and pass an instance to plugin/rpcplugin.Main, which will take over
|
||||
// execution of the process and add default behaviors for missing hooks.
|
||||
// Methods from the Hooks interface can be used by a plugin to respond to events. Methods are likely
|
||||
// to be added over time, and plugins are not expected to implement all of them. Instead, plugins
|
||||
// are expected to implement a subset of them and pass an instance to plugin/rpcplugin.Main, which
|
||||
// will take over execution of the process and add default behaviors for missing hooks.
|
||||
type Hooks interface {
|
||||
// OnActivate is invoked when the plugin is activated. Implementations will usually want to save
|
||||
// the api argument for later use. Loading configuration for the first time is also a commonly
|
||||
|
||||
Ссылка в новой задаче
Block a user