Documentation ¶
Index ¶
Constants ¶
View Source
const (
Name = "nodeProcess"
)
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 2,
MagicCookieKey: "NODE_PROCESS_PLUGIN",
MagicCookieValue: "dynamic",
}
View Source
var PluginMap = map[string]plugin.Plugin{ Name: &AppPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
Types ¶
type AppPlugin ¶
type AppPlugin struct { plugin.NetRPCUnsupportedPlugin // contains filtered or unexported fields }
AppPlugin is can be served/consumed with the hashicorp plugin library. Plugin implements plugin.GRPCPlugin
func (*AppPlugin) GRPCClient ¶
func (p *AppPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient returns a new GRPC client
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(node pluginproto.NodeClient) *Client
NewServer returns an app instance connected to a remote app instance
type Server ¶
type Server struct { pluginproto.UnimplementedNodeServer // contains filtered or unexported fields }
Server wraps a node so it can be served with the hashicorp plugin harness
func (*Server) ExitCode ¶
func (s *Server) ExitCode(context.Context, *emptypb.Empty) (*pluginproto.ExitCodeResponse, error)
Click to show internal directories.
Click to hide internal directories.