Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "AETHER_EXPORTER_PLUGIN",
MagicCookieValue: "886c2a46-18b4-4090-8e13-0461439bb0d0",
}
Handshake is a common handshake that is shared by plugin and host. this is to make sure that versioning of plugins is equal and is not for security
Functions ¶
This section is empty.
Types ¶
type ExportPluginSystem ¶
type ExportPluginSystem struct {
Dir string
Plugins []*RegisteredPlugin
}
ExportPluginSystem is used to manage all third party exporters
type ExporterPlugin ¶
type ExporterPlugin struct {
// GRPCPlugin must still implement the Plugin interface
plugin.Plugin
// Concrete implementation, written in Go. This is only used for plugins
// that are written in Go.
Impl Exporter
}
This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
func (*ExporterPlugin) GRPCClient ¶
func (p *ExporterPlugin) GRPCClient( ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
GRPCClient returns a gRPC client
func (*ExporterPlugin) GRPCServer ¶
func (p *ExporterPlugin) GRPCServer( broker *plugin.GRPCBroker, s *grpc.Server, ) error
GRPCServer is used to setup a GRPC server
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of Exporter that can communicate over RPC
type GRPCServer ¶
type GRPCServer struct {
Impl Exporter
}
GRPCServer is the gRPC server that GRPCClient talks to.
func (*GRPCServer) Send ¶
func (m *GRPCServer) Send( ctx context.Context, req *proto.InstanceRequest) (*proto.Empty, error)
Send is used to receive the RPC requests
type PluginHandler ¶
type PluginHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(ctx context.Context, e *ExportPluginSystem) *PluginHandler
func (*PluginHandler) SendToExporters ¶
func (p *PluginHandler) SendToExporters(ctx context.Context, e *bus.Event)
func (*PluginHandler) Stop ¶
func (p *PluginHandler) Stop(ctx context.Context)
type RegisteredPlugin ¶
type RegisteredPlugin struct {
Name string
Exporter Exporter
Client plugin.ClientProtocol
}
RegisteredPlugin is all the information needed to manage a registered plugin
Directories
¶
| Path | Synopsis |
|---|---|
|
* This is a skeleton plugin that you can use to build an Aether ExporterPlugin * it is minimal with no functionality but adheres to the Aether plugin * interface
|
* This is a skeleton plugin that you can use to build an Aether ExporterPlugin * it is minimal with no functionality but adheres to the Aether plugin * interface |
Click to show internal directories.
Click to hide internal directories.