shared

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ApplicationResponseSuccess string = "no_error"
)

Variables

View Source
var Handshake = plugin.HandshakeConfig{

	ProtocolVersion:  1,
	MagicCookieKey:   "BASIC_PLUGIN",
	MagicCookieValue: "hello",
}

Handshake is a common handshake that is shared by plugin and host.

View Source
var PluginMap = map[string]plugin.Plugin{
	"plugin_grpc": &GRPCPlugin{},
}

PluginMap is the map of plugins we can dispense.

Functions

This section is empty.

Types

type GRPCClient added in v1.0.5

type GRPCClient struct {
	// contains filtered or unexported fields
}

func (*GRPCClient) Init added in v1.0.5

func (g *GRPCClient) Init(m map[string]string) error

func (*GRPCClient) Name added in v1.0.5

func (g *GRPCClient) Name() (string, error)

func (*GRPCClient) ParseOutput added in v1.0.5

func (g *GRPCClient) ParseOutput() (string, error)

func (*GRPCClient) Run added in v1.0.5

func (g *GRPCClient) Run() error

func (*GRPCClient) Version added in v1.0.5

func (g *GRPCClient) Version() (string, error)

type GRPCPlugin added in v1.0.5

type GRPCPlugin struct {
	// GRPCPlugin must still implement the Plugin interface
	plugin.Plugin
	// Concrete implementation, written in Go. This is only used for plugins
	// that are written in Go.
	Impl IPlugin
}

func (*GRPCPlugin) GRPCClient added in v1.0.5

func (p *GRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*GRPCPlugin) GRPCServer added in v1.0.5

func (p *GRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type GRPCServer added in v1.0.5

type GRPCServer struct {
	plugininterface.UnimplementedHypothesisServer
	Impl IPlugin
	// contains filtered or unexported fields
}

func (*GRPCServer) Init added in v1.0.5

func (*GRPCServer) Name added in v1.0.5

func (*GRPCServer) ParseOutput added in v1.0.5

func (*GRPCServer) Run added in v1.0.5

func (*GRPCServer) Version added in v1.0.5

type IPlugin added in v1.0.5

type IPlugin interface {
	Init(map[string]string) error
	Name() (string, error)
	Version() (string, error)
	Run() error
	ParseOutput() (string, error)
}

Jump to

Keyboard shortcuts

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