Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = goplugin.HandshakeConfig{
ProtocolVersion: 2,
MagicCookieKey: "FORGE_PLUGIN",
MagicCookieValue: "forge",
}
Handshake is the plugin handshake configuration. Plugins and hosts must use the same values to communicate.
View Source
var Plugins = map[string]goplugin.Plugin{ "driver": &DriverPlugin{}, }
Plugins is the map of supported plugin types for use with go-plugin.
Functions ¶
func Serve ¶
func Serve(df plugins.DriverFactory)
Serve starts the plugin process and serves the Driver over gRPC.
func ServeContext ¶
func ServeContext(dcf DriverContextFactory)
ServeContext starts the plugin with context support for cancellation.
func ServeContextWithLogger ¶
func ServeContextWithLogger(dcf DriverContextFactory, logger hclog.Logger)
ServeContextWithLogger starts the plugin with context support and a custom logger.
func ServeWithLogger ¶
func ServeWithLogger(df plugins.DriverFactory, logger hclog.Logger)
ServeWithLogger starts the plugin with a custom logger.
Types ¶
type DriverContextFactory ¶
DriverContextFactory creates a Driver with context support (external plugins only).
type DriverPlugin ¶
DriverPlugin is the hashicorp/go-plugin wrapper for the Driver interface.
func (*DriverPlugin) GRPCClient ¶
func (p *DriverPlugin) GRPCClient(ctx context.Context, broker *goplugin.GRPCBroker, c *grpc.ClientConn) (any, error)
func (*DriverPlugin) GRPCServer ¶
func (p *DriverPlugin) GRPCServer(broker *goplugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.