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 ActivePlugin
- type PluginLoader
- type TypedActivePlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientScheme = meta.NewScheme()
View Source
var ErrNotImplemented = errors.New("not implemented")
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: plugin.CoreProtocolVersion,
MagicCookieKey: "OPNI_MONITORING_MAGIC_COOKIE",
MagicCookieValue: "opni-monitoring",
}
Functions ¶
func CheckAvailability ¶
func ClientConfig ¶
func ClientConfig(md meta.PluginMeta, scheme meta.Scheme, reattach ...*plugin.ReattachConfig) *plugin.ClientConfig
func ConfigureSysProcAttr ¶
func ServeConfig ¶
Types ¶
type ActivePlugin ¶
type ActivePlugin struct { Metadata meta.PluginMeta GRPCClient *grpc.ClientConn RPCClient *plugin.RPCClient Raw interface{} }
type PluginLoader ¶
type PluginLoader struct { ActivePlugins map[string][]ActivePlugin Logger *zap.SugaredLogger }
func NewPluginLoader ¶
func NewPluginLoader() *PluginLoader
func (*PluginLoader) DispenseAll ¶
func (pl *PluginLoader) DispenseAll(id string) []ActivePlugin
func (*PluginLoader) Load ¶
func (pl *PluginLoader) Load(md meta.PluginMeta, cc *plugin.ClientConfig)
type TypedActivePlugin ¶
type TypedActivePlugin[T any] struct { Metadata meta.PluginMeta Client *grpc.ClientConn Typed T }
func DispenseAllAs ¶
func DispenseAllAs[T any](pl *PluginLoader, id string) []TypedActivePlugin[T]
Click to show internal directories.
Click to hide internal directories.