Documentation ¶
Overview ¶
Package shared contains shared data between the host and plugins.
Index ¶
- Constants
- Variables
- type GRPCClient
- type GRPCServer
- func (m *GRPCServer) Get(_ context.Context, req *proto.GetRequest) (*proto.GetResponse, error)
- func (m *GRPCServer) RefreshConnections(_ context.Context, req *proto.RefreshConnectionsRequest) (*proto.RefreshConnectionsResponse, error)
- func (m *GRPCServer) Shutdown(_ context.Context, req *proto.ShutdownRequest) (*proto.ShutdownResponse, error)
- type PluginManager
- type PluginManagerPlugin
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 *proto.GetRequest) (*proto.GetResponse, error)
func (*GRPCClient) RefreshConnections ¶
func (c *GRPCClient) RefreshConnections(req *proto.RefreshConnectionsRequest) (*proto.RefreshConnectionsResponse, error)
func (*GRPCClient) Shutdown ¶
func (c *GRPCClient) Shutdown(req *proto.ShutdownRequest) (*proto.ShutdownResponse, error)
type GRPCServer ¶
type GRPCServer struct { proto.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 *proto.GetRequest) (*proto.GetResponse, error)
func (*GRPCServer) RefreshConnections ¶
func (m *GRPCServer) RefreshConnections(_ context.Context, req *proto.RefreshConnectionsRequest) (*proto.RefreshConnectionsResponse, error)
func (*GRPCServer) Shutdown ¶
func (m *GRPCServer) Shutdown(_ context.Context, req *proto.ShutdownRequest) (*proto.ShutdownResponse, error)
type PluginManager ¶
type PluginManager interface { Get(req *proto.GetRequest) (*proto.GetResponse, error) RefreshConnections(req *proto.RefreshConnectionsRequest) (*proto.RefreshConnectionsResponse, error) Shutdown(req *proto.ShutdownRequest) (*proto.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.