rpc

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2013 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Artifact

func Artifact(client *rpc.Client) *artifact

func Build

func Build(client *rpc.Client) *build

func Builder

func Builder(client *rpc.Client) *builder

func Cache

func Cache(client *rpc.Client) *cache

func Command

func Command(client *rpc.Client) *command

func Communicator

func Communicator(client *rpc.Client) *communicator

func Hook

func Hook(client *rpc.Client) *hook

func PortRange

func PortRange(min, max int)

This sets the port range that the RPC stuff will use when creating new temporary servers. Some RPC calls require the creation of temporary RPC servers. These allow you to pick a range these bind to.

func PostProcessor

func PostProcessor(client *rpc.Client) *postProcessor

func Provisioner

func Provisioner(client *rpc.Client) *provisioner

func RegisterArtifact

func RegisterArtifact(s *rpc.Server, a packer.Artifact)

Registers the appropriate endpoint on an RPC server to serve an Artifact.

func RegisterBuild

func RegisterBuild(s *rpc.Server, b packer.Build)

Registers the appropriate endpoint on an RPC server to serve a Packer Build.

func RegisterBuilder

func RegisterBuilder(s *rpc.Server, b packer.Builder)

Registers the appropriate endpoint on an RPC server to serve a Packer Builder.

func RegisterCache

func RegisterCache(s *rpc.Server, c packer.Cache)

Registers the appropriate endpoint on an RPC server to serve a Packer Cache.

func RegisterCommand

func RegisterCommand(s *rpc.Server, c packer.Command)

Registers the appropriate endpoint on an RPC server to serve a Packer Command.

func RegisterCommunicator

func RegisterCommunicator(s *rpc.Server, c packer.Communicator)

Registers the appropriate endpoint on an RPC server to serve a Packer Communicator.

func RegisterEnvironment

func RegisterEnvironment(s *rpc.Server, e packer.Environment)

Registers the appropriate endpoint on an RPC server to serve a Packer Environment

func RegisterHook

func RegisterHook(s *rpc.Server, hook packer.Hook)

Registers the appropriate endpoint on an RPC server to serve a Hook.

func RegisterPostProcessor

func RegisterPostProcessor(s *rpc.Server, p packer.PostProcessor)

Registers the appropriate endpoing on an RPC server to serve a PostProcessor.

func RegisterProvisioner

func RegisterProvisioner(s *rpc.Server, p packer.Provisioner)

Registers the appropriate endpoint on an RPC server to serve a packer.Provisioner

func RegisterUi

func RegisterUi(s *rpc.Server, ui packer.Ui)

Registers the appropriate endpoint on an RPC server to serve a Packer UI

Types

type ArtifactServer

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

ArtifactServer wraps a packer.Artifact implementation and makes it exportable as part of a Golang RPC server.

func (*ArtifactServer) BuilderId

func (s *ArtifactServer) BuilderId(args *interface{}, reply *string) error

func (*ArtifactServer) Destroy

func (s *ArtifactServer) Destroy(args *interface{}, reply *error) error

func (*ArtifactServer) Files

func (s *ArtifactServer) Files(args *interface{}, reply *[]string) error

func (*ArtifactServer) Id

func (s *ArtifactServer) Id(args *interface{}, reply *string) error

func (*ArtifactServer) String

func (s *ArtifactServer) String(args *interface{}, reply *string) error

type BasicError

type BasicError struct {
	Message string
}

This is a type that wraps error types so that they can be messaged across RPC channels. Since "error" is an interface, we can't always gob-encode the underlying structure. This is a valid error interface implementer that we will push across.

func NewBasicError

func NewBasicError(err error) *BasicError

func (*BasicError) Error

func (e *BasicError) Error() string

type BuildPrepareResponse added in v0.3.11

type BuildPrepareResponse struct {
	Warnings []string
	Error    error
}

type BuildRunArgs

type BuildRunArgs struct {
	UiRPCAddress string
}

type BuildServer

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

BuildServer wraps a packer.Build implementation and makes it exportable as part of a Golang RPC server.

func (*BuildServer) Cancel

func (b *BuildServer) Cancel(args *interface{}, reply *interface{}) error

func (*BuildServer) Name

func (b *BuildServer) Name(args *interface{}, reply *string) error

func (*BuildServer) Prepare

func (b *BuildServer) Prepare(v map[string]string, resp *BuildPrepareResponse) error

func (*BuildServer) Run

func (b *BuildServer) Run(args *BuildRunArgs, reply *[]string) error

func (*BuildServer) SetDebug

func (b *BuildServer) SetDebug(val *bool, reply *interface{}) error

func (*BuildServer) SetForce added in v0.2.0

func (b *BuildServer) SetForce(val *bool, reply *interface{}) error

type BuilderPrepareArgs

type BuilderPrepareArgs struct {
	Configs []interface{}
}

type BuilderPrepareResponse added in v0.3.11

type BuilderPrepareResponse struct {
	Warnings []string
	Error    error
}

type BuilderRunArgs

type BuilderRunArgs struct {
	RPCAddress      string
	ResponseAddress string
}

type BuilderRunResponse

type BuilderRunResponse struct {
	Err        error
	RPCAddress string
}

type BuilderServer

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

BuilderServer wraps a packer.Builder implementation and makes it exportable as part of a Golang RPC server.

func (*BuilderServer) Cancel

func (b *BuilderServer) Cancel(args *interface{}, reply *interface{}) error

func (*BuilderServer) Prepare

func (*BuilderServer) Run

func (b *BuilderServer) Run(args *BuilderRunArgs, reply *interface{}) error

type CacheRLockResponse

type CacheRLockResponse struct {
	Path   string
	Exists bool
}

type CacheServer

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

CacheServer wraps a packer.Cache implementation and makes it exportable as part of a Golang RPC server.

func (*CacheServer) Lock

func (c *CacheServer) Lock(key string, result *string) error

func (*CacheServer) RLock

func (c *CacheServer) RLock(key string, result *CacheRLockResponse) error

func (*CacheServer) RUnlock

func (c *CacheServer) RUnlock(key string, result *interface{}) error

func (*CacheServer) Unlock

func (c *CacheServer) Unlock(key string, result *interface{}) error

type CommandFinished

type CommandFinished struct {
	ExitStatus int
}

type CommandRunArgs

type CommandRunArgs struct {
	RPCAddress string
	Args       []string
}

type CommandServer

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

A CommandServer wraps a packer.Command and makes it exportable as part of a Golang RPC server.

func (*CommandServer) Help

func (c *CommandServer) Help(args *interface{}, reply *string) error

func (*CommandServer) Run

func (c *CommandServer) Run(args *CommandRunArgs, reply *int) error

func (*CommandServer) Synopsis

func (c *CommandServer) Synopsis(args *CommandSynopsisArgs, reply *string) error

type CommandSynopsisArgs

type CommandSynopsisArgs byte

type CommunicatorDownloadArgs

type CommunicatorDownloadArgs struct {
	Path          string
	WriterAddress string
}

type CommunicatorServer

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

CommunicatorServer wraps a packer.Communicator implementation and makes it exportable as part of a Golang RPC server.

func (*CommunicatorServer) Download

func (c *CommunicatorServer) Download(args *CommunicatorDownloadArgs, reply *interface{}) (err error)

func (*CommunicatorServer) Start

func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface{}) (err error)

func (*CommunicatorServer) Upload

func (c *CommunicatorServer) Upload(args *CommunicatorUploadArgs, reply *interface{}) (err error)

func (*CommunicatorServer) UploadDir added in v0.3.5

func (c *CommunicatorServer) UploadDir(args *CommunicatorUploadDirArgs, reply *error) error

type CommunicatorStartArgs

type CommunicatorStartArgs struct {
	Command         string
	StdinAddress    string
	StdoutAddress   string
	StderrAddress   string
	ResponseAddress string
}

type CommunicatorUploadArgs

type CommunicatorUploadArgs struct {
	Path          string
	ReaderAddress string
}

type CommunicatorUploadDirArgs added in v0.3.5

type CommunicatorUploadDirArgs struct {
	Dst     string
	Src     string
	Exclude []string
}

type Environment

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

A Environment is an implementation of the packer.Environment interface where the actual environment is executed over an RPC connection.

func (*Environment) Builder

func (e *Environment) Builder(name string) (b packer.Builder, err error)

func (*Environment) Cache

func (e *Environment) Cache() packer.Cache

func (*Environment) Cli

func (e *Environment) Cli(args []string) (result int, err error)

func (*Environment) Hook

func (e *Environment) Hook(name string) (h packer.Hook, err error)

func (*Environment) PostProcessor

func (e *Environment) PostProcessor(name string) (p packer.PostProcessor, err error)

func (*Environment) Provisioner

func (e *Environment) Provisioner(name string) (p packer.Provisioner, err error)

func (*Environment) Ui

func (e *Environment) Ui() packer.Ui

type EnvironmentCliArgs

type EnvironmentCliArgs struct {
	Args []string
}

type EnvironmentServer

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

A EnvironmentServer wraps a packer.Environment and makes it exportable as part of a Golang RPC server.

func (*EnvironmentServer) Builder

func (e *EnvironmentServer) Builder(name *string, reply *string) error

func (*EnvironmentServer) Cache

func (e *EnvironmentServer) Cache(args *interface{}, reply *string) error

func (*EnvironmentServer) Cli

func (e *EnvironmentServer) Cli(args *EnvironmentCliArgs, reply *int) (err error)

func (*EnvironmentServer) Hook

func (e *EnvironmentServer) Hook(name *string, reply *string) error

func (*EnvironmentServer) PostProcessor

func (e *EnvironmentServer) PostProcessor(name *string, reply *string) error

func (*EnvironmentServer) Provisioner

func (e *EnvironmentServer) Provisioner(name *string, reply *string) error

func (*EnvironmentServer) Ui

func (e *EnvironmentServer) Ui(args *interface{}, reply *string) error

type HookRunArgs

type HookRunArgs struct {
	Name       string
	Data       interface{}
	RPCAddress string
}

type HookServer

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

HookServer wraps a packer.Hook implementation and makes it exportable as part of a Golang RPC server.

func (*HookServer) Cancel added in v0.3.6

func (h *HookServer) Cancel(args *interface{}, reply *interface{}) error

func (*HookServer) Run

func (h *HookServer) Run(args *HookRunArgs, reply *interface{}) error

type PostProcessorConfigureArgs added in v0.1.4

type PostProcessorConfigureArgs struct {
	Configs []interface{}
}

type PostProcessorProcessResponse

type PostProcessorProcessResponse struct {
	Err        error
	Keep       bool
	RPCAddress string
}

type PostProcessorServer

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

PostProcessorServer wraps a packer.PostProcessor implementation and makes it exportable as part of a Golang RPC server.

func (*PostProcessorServer) Configure

func (p *PostProcessorServer) Configure(args *PostProcessorConfigureArgs, reply *error) error

func (*PostProcessorServer) PostProcess

func (p *PostProcessorServer) PostProcess(address string, reply *PostProcessorProcessResponse) error

type ProvisionerPrepareArgs

type ProvisionerPrepareArgs struct {
	Configs []interface{}
}

type ProvisionerProvisionArgs

type ProvisionerProvisionArgs struct {
	RPCAddress string
}

type ProvisionerServer

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

ProvisionerServer wraps a packer.Provisioner implementation and makes it exportable as part of a Golang RPC server.

func (*ProvisionerServer) Cancel added in v0.3.6

func (p *ProvisionerServer) Cancel(args *interface{}, reply *interface{}) error

func (*ProvisionerServer) Prepare

func (p *ProvisionerServer) Prepare(args *ProvisionerPrepareArgs, reply *error) error

func (*ProvisionerServer) Provision

func (p *ProvisionerServer) Provision(args *ProvisionerProvisionArgs, reply *interface{}) error

type Ui

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

An implementation of packer.Ui where the Ui is actually executed over an RPC connection.

func (*Ui) Ask

func (u *Ui) Ask(query string) (result string, err error)

func (*Ui) Error

func (u *Ui) Error(message string)

func (*Ui) Machine added in v0.3.0

func (u *Ui) Machine(t string, args ...string)

func (*Ui) Message

func (u *Ui) Message(message string)

func (*Ui) Say

func (u *Ui) Say(message string)

type UiMachineArgs added in v0.3.0

type UiMachineArgs struct {
	Category string
	Args     []string
}

The arguments sent to Ui.Machine

type UiServer

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

UiServer wraps a packer.Ui implementation and makes it exportable as part of a Golang RPC server.

func (*UiServer) Ask

func (u *UiServer) Ask(query string, reply *string) (err error)

func (*UiServer) Error

func (u *UiServer) Error(message *string, reply *interface{}) error

func (*UiServer) Machine added in v0.3.0

func (u *UiServer) Machine(args *UiMachineArgs, reply *interface{}) error

func (*UiServer) Message

func (u *UiServer) Message(message *string, reply *interface{}) error

func (*UiServer) Say

func (u *UiServer) Say(message *string, reply *interface{}) error

Jump to

Keyboard shortcuts

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