Этот коммит содержится в:
Chris
2017-11-03 11:34:44 -05:00
коммит произвёл Christopher Speller
родитель 71dd21ef3d
Коммит d2cff9b77c
6 изменённых файлов: 47 добавлений и 12 удалений

Просмотреть файл

@@ -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