Documentation ¶
Overview ¶
Package shared contains shared data between the host and plugins.
Index ¶
Constants ¶
View Source
const PluginName = "steampipe_plugin_manager"
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
MagicCookieKey: "PLUGIN_MANAGER_MAGIC_COOKIE",
MagicCookieValue: "really-complex-permanent-string-value",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ PluginName: &PluginManagerPlugin{}, }
PluginMap is a ma of the plugins supported, _without the implementation_ this used to create a GRPC client
Functions ¶
This section is empty.
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of PluginManager service that talks over GRPC.
func (*GRPCClient) Get ¶
func (c *GRPCClient) Get(req *pb.GetRequest) (*pb.GetResponse, error)
func (*GRPCClient) Shutdown ¶
func (c *GRPCClient) Shutdown(req *pb.ShutdownRequest) (*pb.ShutdownResponse, error)
type GRPCServer ¶
type GRPCServer struct { pb.UnimplementedPluginManagerServer // This is the real implementation Impl PluginManager }
GRPCServer is the gRPC server that GRPCClient talks to.
func (*GRPCServer) Get ¶
func (m *GRPCServer) Get(_ context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
func (*GRPCServer) Shutdown ¶
func (m *GRPCServer) Shutdown(_ context.Context, req *pb.ShutdownRequest) (*pb.ShutdownResponse, error)
type PluginManager ¶
type PluginManager interface { Get(req *pb.GetRequest) (*pb.GetResponse, error) Shutdown(req *pb.ShutdownRequest) (*pb.ShutdownResponse, error) }
PluginManager is the interface for the plugin manager service
type PluginManagerPlugin ¶
type PluginManagerPlugin struct { // GRPCPlugin must still implement the Stub interface plugin.Plugin // Concrete implementation Impl PluginManager }
PluginManagerPlugin is the implementation of plugin.GRPCServer so we can serve/consume this.
func (*PluginManagerPlugin) GRPCClient ¶
func (p *PluginManagerPlugin) GRPCClient(ctx context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient returns a GRPCClient, called by Dispense
func (*PluginManagerPlugin) GRPCServer ¶
func (p *PluginManagerPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.