cloudconfig

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

View Source
const PluginsMapHash = "cloudconfig"

PluginsMapHash is an identifier for plugins registered with the go-plugin library.

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  2,
	MagicCookieKey:   "BASIC_PLUGIN",
	MagicCookieValue: "hello",
}

HandshakeConfig is the configuration for establishing communication between the CLI plugins.

Functions

func Run

func Run(cc Deployer)

Run runs a CloudConfigDeployer as an RPC server. It should be called from a plugin's func main.

Types

type Deployer

type Deployer interface {
	GetMeta() Meta
	GetFlags() []pcli.Flag
	GetCloudConfig(args []string) ([]byte, error)
}

Deployer is the interface for cloud config plugins

type Meta

type Meta struct {
	Name       string
	Properties map[string]interface{}
}

type Plugin

type Plugin struct {
	Plugin Deployer
}

func NewCloudConfigPlugin

func NewCloudConfigPlugin(plg Deployer) Plugin

func (Plugin) Client

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

func (Plugin) Server

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

type RPC

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

RPC - Here is an implementation that talks over RPC

func (*RPC) GetCloudConfig

func (s *RPC) GetCloudConfig(args []string) ([]byte, error)

func (*RPC) GetFlags

func (s *RPC) GetFlags() []pcli.Flag

func (*RPC) GetMeta

func (s *RPC) GetMeta() Meta

type RPCServer

type RPCServer struct {
	Impl Deployer
}

RPCServer - Here is the RPC server that GreeterRPC talks to, conforming to the requirements of net/rpc

func (*RPCServer) GetCloudConfig

func (s *RPCServer) GetCloudConfig(args []string, resp *Response) error

func (*RPCServer) GetFlags

func (s *RPCServer) GetFlags(args interface{}, resp *[]pcli.Flag) error

func (*RPCServer) GetMeta

func (s *RPCServer) GetMeta(args interface{}, resp *Meta) error

type Response

type Response struct {
	Bytes  []byte
	ErrRes string
}

Response contains the results of a GetCloudConfig RPC call.

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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