plugin

package
v0.0.0-...-b863ece Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "AC_PLUGIN_MAGIC_COOKIE",
	MagicCookieValue: "secret-cat",
}

Handshake is the HandshakeConfig used to configure clients and servers.

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

Functions

func Serve

func Serve(opts *ServeOpts)

Serve serves a plugin. This function never returns and should be the final function called in the main function of the plugin.

Types

type ActionProvider

type ActionProvider struct {
	Broker *plugin.MuxBroker
	Client *rpc.Client
}

ActionProvider is an implementation of terraform.ResourceProvider that communicates over RPC.

func (*ActionProvider) Configure

func (p *ActionProvider) Configure(conf *achieve.ProviderConfig) error

func (*ActionProvider) Execute

func (p *ActionProvider) Execute(action *achieve.Action) error

type ActionProviderConfigureArgs

type ActionProviderConfigureArgs struct {
	Config *achieve.ProviderConfig
}

type ActionProviderConfigureResponse

type ActionProviderConfigureResponse struct {
	Error *plugin.BasicError
}

type ActionProviderExecuteArgs

type ActionProviderExecuteArgs struct {
	Action *achieve.Action
}

type ActionProviderExecuteResponse

type ActionProviderExecuteResponse struct {
	Error *plugin.BasicError
}

type ActionProviderPlugin

type ActionProviderPlugin struct {
	F achieve.ActionProviderFunc
}

ActionProviderPlugin is the plugin.Plugin implementation.

func (*ActionProviderPlugin) Client

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

func (*ActionProviderPlugin) Server

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

type ActionProviderServer

type ActionProviderServer struct {
	Broker   *plugin.MuxBroker
	Provider achieve.ActionProvider
}

func (*ActionProviderServer) Configure

func (*ActionProviderServer) Execute

type ServeOpts

type ServeOpts struct {
	ActionFunc achieve.ActionProviderFunc
}

ServeOpts are the configurations to serve a plugin.

Jump to

Keyboard shortcuts

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