shared

package
v0.0.0-...-2193aa2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "debugtalk"

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "HttpRunnerPlus",
	MagicCookieValue: Name,
}

handshakeConfigs are used to just do a basic handshake between a plugin and host. If the handshake fails, a user friendly error is shown. This prevents users from executing bad plugins or executing a plugin directory. It is a UX feature, not a security feature.

Functions

This section is empty.

Types

type FuncCaller

type FuncCaller interface {
	GetNames() ([]string, error)                                    // get all plugin function names list
	Call(funcName string, args ...interface{}) (interface{}, error) // call plugin function
}

FuncCaller is the interface that we're exposing as a plugin.

type HashicorpPlugin

type HashicorpPlugin struct {
	Impl FuncCaller
}

HashicorpPlugin implements hashicorp's plugin.Plugin.

func (HashicorpPlugin) Client

func (HashicorpPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*HashicorpPlugin) Server

func (p *HashicorpPlugin) Server(*plugin.MuxBroker) (interface{}, error)

Jump to

Keyboard shortcuts

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