Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExampleHandler ¶ added in v1.12.0
NewExampleHandler provide a example handler
func NewExamplePlugin ¶
func NewExamplePlugin() *examplePlugin
NewExamplePlugin returns an initialized examplePlugin instance
Types ¶
type PluginHandler ¶ added in v1.12.0
type PluginHandler interface { // Validate returns an error if the information provided by // the potential plugin is erroneous (unsupported version, ...) ValidatePlugin(pluginName string, endpoint string, versions []string, foundInDeprecatedDir bool) error // RegisterPlugin is called so that the plugin can be register by any // plugin consumer // Error encountered here can still be Notified to the plugin. RegisterPlugin(pluginName, endpoint string, versions []string) error // DeRegister is called once the pluginwatcher observes that the socket has // been deleted. DeRegisterPlugin(pluginName string) }
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is the plugin watcher
func NewWatcher ¶
NewWatcher provides a new watcher deprecatedSockDir refers to a pre-GA directory that was used by older plugins for socket registration. New plugins should not use this directory.
func (*Watcher) AddHandler ¶
func (w *Watcher) AddHandler(pluginType string, handler PluginHandler)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.