product

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: 18

Documentation

Index

Constants

View Source
const PluginsMapHash = "product"

Variables

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

Functions

func Run

func Run(cc ProductDeployer)

Types

type Meta

type Meta struct {
	Name       string
	Properties map[string]interface{}
	Releases   []enaml.Release
	Stemcell   enaml.Stemcell
}

type ProductDeployer

type ProductDeployer interface {
	GetMeta() Meta
	GetFlags() []pcli.Flag
	GetProduct(args []string, cloudConfig []byte) ([]byte, error)
}

ProductDeployer is the interface that we will expose for product plugins

type ProductPlugin

type ProductPlugin struct {
	Plugin ProductDeployer
}

func NewProductPlugin

func NewProductPlugin(plg ProductDeployer) ProductPlugin

func (ProductPlugin) Client

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

func (ProductPlugin) Server

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

type ProductRPC

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

ProductRPC - Here is an implementation that talks over RPC

func (*ProductRPC) GetFlags

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

func (*ProductRPC) GetMeta

func (s *ProductRPC) GetMeta() Meta

func (*ProductRPC) GetProduct

func (s *ProductRPC) GetProduct(args []string, cloudConfig []byte) (b []byte, err error)

type ProductRPCServer

type ProductRPCServer struct {
	Impl ProductDeployer
}

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

func (*ProductRPCServer) GetFlags

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

func (*ProductRPCServer) GetMeta

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

func (*ProductRPCServer) GetProduct

func (s *ProductRPCServer) GetProduct(args RPCArgs, resp *RPCResponse) error

type RPCArgs

type RPCArgs struct {
	Arg1 []string
	Arg2 []byte
}

type RPCResponse added in v0.1.1

type RPCResponse struct {
	ResBytes []byte
	ErrRes   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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