plugin

package
v1.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 New

func New(app *process.App) *AppPlugin

func (*AppPlugin) GRPCClient

func (p *AppPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a new GRPC client

func (*AppPlugin) GRPCServer

func (p *AppPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer registers a new GRPC server.

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

func (*Client) Start

func (c *Client) Start() (int, error)

Blocks until the node is done shutting down. Returns the node's exit code.

func (*Client) Stop

func (c *Client) Stop() error

Blocks until the node is done shutting down.

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 NewServer

func NewServer(app *process.App) *Server

func (*Server) Start

Blocks until the node returns

func (*Server) Stop

Blocks until the node is done shutting down

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL