Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "NODE_PROCESS_PLUGIN",
MagicCookieValue: "dynamic",
}
View Source
var PluginMap = map[string]plugin.Plugin{ "nodeProcess": &AppPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
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 appproto.NodeClient) *Client
NewServer returns a vm instance connected to a remote vm instance
type Server ¶
type Server struct { appproto.UnimplementedNodeServer // contains filtered or unexported fields }
Server wraps a node so it can be served with the hashicorp plugin harness
func (*Server) Start ¶
func (ns *Server) Start(_ context.Context, req *appproto.StartRequest) (*appproto.StartResponse, error)
Blocks until the node returns
func (*Server) Stop ¶
func (ns *Server) Stop(_ context.Context, req *appproto.StopRequest) (*appproto.StopResponse, error)
Blocks until the node is done shutting down
Click to show internal directories.
Click to hide internal directories.