Documentation ¶
Index ¶
- Variables
- func CheckAvailability(ctx context.Context, cc *grpc.ClientConn, id string) error
- func ClientConfig(md meta.PluginMeta, scheme meta.Scheme, reattach ...*plugin.ReattachConfig) *plugin.ClientConfig
- func ConfigureSysProcAttr(cmd *exec.Cmd)
- func Serve(scheme meta.Scheme)
- func ServeConfig(scheme meta.Scheme) *plugin.ServeConfig
- type LoaderInterface
- type PluginLoader
Constants ¶
This section is empty.
Variables ¶
var ClientScheme = meta.NewScheme()
var ErrNotImplemented = errors.New("not implemented")
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: plugin.CoreProtocolVersion,
MagicCookieKey: "OPNI_MONITORING_MAGIC_COOKIE",
MagicCookieValue: "opni-monitoring",
}
var NoopLoader = noopLoader{}
Functions ¶
func CheckAvailability ¶
func ClientConfig ¶
func ClientConfig(md meta.PluginMeta, scheme meta.Scheme, reattach ...*plugin.ReattachConfig) *plugin.ClientConfig
func ConfigureSysProcAttr ¶
func ServeConfig ¶
Types ¶
type LoaderInterface ¶ added in v0.5.4
type LoaderInterface interface { // Adds a hook to the loader, which will be invoked at a specific time according // to the hook type. See the specific hooks for more information. Hook(h any) }
type PluginLoader ¶
type PluginLoader struct {
// contains filtered or unexported fields
}
func NewPluginLoader ¶
func NewPluginLoader() *PluginLoader
func (*PluginLoader) Complete ¶ added in v0.5.4
func (p *PluginLoader) Complete()
Complete marks the plugin loader as completed. This function will be called automatically by LoadPlugins(), although it can be called manually if LoadPlugins() is not used. It is not safe to call this function and LoadPlugins() on the same plugin loader. It will invoke LoadingCompletedHooks in parallel and does not block.
func (*PluginLoader) Hook ¶ added in v0.5.4
func (p *PluginLoader) Hook(h any)
func (*PluginLoader) LoadOne ¶ added in v0.5.4
func (p *PluginLoader) LoadOne(ctx context.Context, md meta.PluginMeta, cc *plugin.ClientConfig)
LoadOne loads a single plugin. It invokes PluginLoadHooks for the type of the plugin being loaded and will block until all load hooks have completed.
func (*PluginLoader) LoadPlugins ¶ added in v0.5.4
func (p *PluginLoader) LoadPlugins(ctx context.Context, conf v1beta1.PluginsSpec, reattach ...*plugin.ReattachConfig)
LoadPlugins loads a set of plugins defined by the plugin configuration. This function loads plugins in parallel and does not block. It will invoke LoadingCompletedHooks once all plugins have been loaded. Once this function is called, it is unsafe to call LoadPlugins() or LoadOne() again for this plugin loader, although new hooks can still be added and will be invoked immediately according to the current state of the plugin loader.
Directories ¶
Path | Synopsis |
---|---|
apis
|
|
Package hooks contains interfaces used to invoke callbacks at specific points during the plugin loading process.
|
Package hooks contains interfaces used to invoke callbacks at specific points during the plugin loading process. |