standalone

package
v5.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

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.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Config       pluginutils.PluginConfig
	ClientConfig *plugin.ClientConfig

	Impl StandaloneService
	// contains filtered or unexported fields
}

func NewPlugin

func NewPlugin(config pluginutils.PluginConfig) *Plugin

func (Plugin) Client

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

func (*Plugin) Handler

func (p *Plugin) Handler() http.Handler

func (*Plugin) HandlerPrefix

func (p *Plugin) HandlerPrefix() string

func (*Plugin) Running added in v5.4.0

func (p *Plugin) Running() bool

func (*Plugin) Server

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

RPC server & client implementation for Plugin interface

func (*Plugin) ServicePort

func (p *Plugin) ServicePort() int

func (*Plugin) Start

func (p *Plugin) Start() error

func (*Plugin) Stop

func (p *Plugin) Stop() error

type RPCPlugin

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

RPCPlugin This section concerns the engine

func (*RPCPlugin) Run

func (g *RPCPlugin) Run(port int) string

type RPCServer

type RPCServer struct {
	// This is the real implementation
	Impl StandaloneService
}

RPCServer This section concerns the plugin

func (*RPCServer) Run

func (s *RPCServer) Run(port int, resp *string) error

type StandaloneService

type StandaloneService interface {
	Run(port int) string // Run's the plugin with parameters
}

StandaloneService A Standalone plugin will wait until the engine sends a Run The plugin timeouts after a given time and shutdown's afterward

Jump to

Keyboard shortcuts

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