Documentation ¶
Index ¶
- Constants
- func Communicator(client *rpc.Client) *communicator
- func NewFileInfo(fi os.FileInfo) *fileInfo
- type ArtifactServer
- func (s *ArtifactServer) BuilderId(args *interface{}, reply *string) error
- func (s *ArtifactServer) Destroy(args *interface{}, reply *error) error
- func (s *ArtifactServer) Files(args *interface{}, reply *[]string) error
- func (s *ArtifactServer) Id(args *interface{}, reply *string) error
- func (s *ArtifactServer) State(name string, reply *interface{}) error
- func (s *ArtifactServer) String(args *interface{}, reply *string) error
- type BasicError
- type BuildPrepareResponse
- type BuildServer
- func (b *BuildServer) Cancel(args *interface{}, reply *interface{}) error
- func (b *BuildServer) Name(args *interface{}, reply *string) error
- func (b *BuildServer) Prepare(args *interface{}, resp *BuildPrepareResponse) error
- func (b *BuildServer) Run(streamId uint32, reply *[]uint32) error
- func (b *BuildServer) SetDebug(val *bool, reply *interface{}) error
- func (b *BuildServer) SetForce(val *bool, reply *interface{}) error
- func (b *BuildServer) SetOnError(val *string, reply *interface{}) error
- type BuilderPrepareArgs
- type BuilderPrepareResponse
- type BuilderServer
- type CacheRLockResponse
- type CacheServer
- type Client
- func (c *Client) Artifact() packer.Artifact
- func (c *Client) Build() packer.Build
- func (c *Client) Builder() packer.Builder
- func (c *Client) Cache() packer.Cache
- func (c *Client) Close() error
- func (c *Client) Communicator() packer.Communicator
- func (c *Client) Hook() packer.Hook
- func (c *Client) PostProcessor() packer.PostProcessor
- func (c *Client) Provisioner() packer.Provisioner
- func (c *Client) Ui() packer.Ui
- type CommandFinished
- type CommunicatorDownloadArgs
- type CommunicatorDownloadDirArgs
- type CommunicatorServer
- func (c *CommunicatorServer) Download(args *CommunicatorDownloadArgs, reply *interface{}) (err error)
- func (c *CommunicatorServer) DownloadDir(args *CommunicatorUploadDirArgs, reply *error) error
- func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface{}) error
- func (c *CommunicatorServer) Upload(args *CommunicatorUploadArgs, reply *interface{}) (err error)
- func (c *CommunicatorServer) UploadDir(args *CommunicatorUploadDirArgs, reply *error) error
- type CommunicatorStartArgs
- type CommunicatorUploadArgs
- type CommunicatorUploadDirArgs
- type HookRunArgs
- type HookServer
- type PostProcessorConfigureArgs
- type PostProcessorProcessResponse
- type PostProcessorServer
- type ProvisionerPrepareArgs
- type ProvisionerServer
- type Server
- func (s *Server) Close() error
- func (s *Server) RegisterArtifact(a packer.Artifact)
- func (s *Server) RegisterBuild(b packer.Build)
- func (s *Server) RegisterBuilder(b packer.Builder)
- func (s *Server) RegisterCache(c packer.Cache)
- func (s *Server) RegisterCommunicator(c packer.Communicator)
- func (s *Server) RegisterHook(h packer.Hook)
- func (s *Server) RegisterPostProcessor(p packer.PostProcessor)
- func (s *Server) RegisterProvisioner(p packer.Provisioner)
- func (s *Server) RegisterUi(ui packer.Ui)
- func (s *Server) Serve()
- type Ui
- type UiMachineArgs
- type UiServer
- func (u *UiServer) Ask(query string, reply *string) (err error)
- func (u *UiServer) Error(message *string, reply *interface{}) error
- func (u *UiServer) Machine(args *UiMachineArgs, reply *interface{}) error
- func (u *UiServer) Message(message *string, reply *interface{}) error
- func (u *UiServer) Say(message *string, reply *interface{}) error
Constants ¶
const ( DefaultArtifactEndpoint string = "Artifact" DefaultBuildEndpoint = "Build" DefaultBuilderEndpoint = "Builder" DefaultCacheEndpoint = "Cache" DefaultCommandEndpoint = "Command" DefaultCommunicatorEndpoint = "Communicator" DefaultHookEndpoint = "Hook" DefaultPostProcessorEndpoint = "PostProcessor" DefaultProvisionerEndpoint = "Provisioner" DefaultUiEndpoint = "Ui" )
Variables ¶
This section is empty.
Functions ¶
func Communicator ¶
func NewFileInfo ¶
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) State ¶
func (s *ArtifactServer) State(name string, reply *interface{}) 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 ¶
type BuildPrepareResponse struct { Warnings []string Error *BasicError }
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(args *interface{}, resp *BuildPrepareResponse) error
func (*BuildServer) SetDebug ¶
func (b *BuildServer) SetDebug(val *bool, reply *interface{}) error
func (*BuildServer) SetForce ¶
func (b *BuildServer) SetForce(val *bool, reply *interface{}) error
func (*BuildServer) SetOnError ¶
func (b *BuildServer) SetOnError(val *string, reply *interface{}) error
type BuilderPrepareArgs ¶
type BuilderPrepareArgs struct {
Configs []interface{}
}
type BuilderPrepareResponse ¶
type BuilderPrepareResponse struct { Warnings []string Error *BasicError }
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 (b *BuilderServer) Prepare(args *BuilderPrepareArgs, reply *BuilderPrepareResponse) error
type CacheRLockResponse ¶
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) 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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client end that communicates with a Packer RPC server. Establishing a connection is up to the user, the Client can just communicate over any ReadWriteCloser.
func (*Client) Communicator ¶
func (c *Client) Communicator() packer.Communicator
func (*Client) PostProcessor ¶
func (c *Client) PostProcessor() packer.PostProcessor
func (*Client) Provisioner ¶
func (c *Client) Provisioner() packer.Provisioner
type CommandFinished ¶
type CommandFinished struct {
ExitStatus int
}
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) DownloadDir ¶
func (c *CommunicatorServer) DownloadDir(args *CommunicatorUploadDirArgs, reply *error) error
func (*CommunicatorServer) Start ¶
func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface{}) error
func (*CommunicatorServer) Upload ¶
func (c *CommunicatorServer) Upload(args *CommunicatorUploadArgs, reply *interface{}) (err error)
func (*CommunicatorServer) UploadDir ¶
func (c *CommunicatorServer) UploadDir(args *CommunicatorUploadDirArgs, reply *error) error
type CommunicatorStartArgs ¶
type CommunicatorUploadArgs ¶
type HookRunArgs ¶
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 ¶
func (h *HookServer) Cancel(args *interface{}, reply *interface{}) error
func (*HookServer) Run ¶
func (h *HookServer) Run(args *HookRunArgs, reply *interface{}) error
type PostProcessorConfigureArgs ¶
type PostProcessorConfigureArgs struct {
Configs []interface{}
}
type PostProcessorProcessResponse ¶
type PostProcessorProcessResponse struct { Err *BasicError Keep bool StreamId uint32 }
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 *interface{}) error
func (*PostProcessorServer) PostProcess ¶
func (p *PostProcessorServer) PostProcess(streamId uint32, reply *PostProcessorProcessResponse) error
type ProvisionerPrepareArgs ¶
type ProvisionerPrepareArgs struct {
Configs []interface{}
}
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 ¶
func (p *ProvisionerServer) Cancel(args *interface{}, reply *interface{}) error
func (*ProvisionerServer) Prepare ¶
func (p *ProvisionerServer) Prepare(args *ProvisionerPrepareArgs, reply *interface{}) error
func (*ProvisionerServer) Provision ¶
func (p *ProvisionerServer) Provision(streamId uint32, reply *interface{}) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an RPC server for Packer. This must be paired on the other side with a Client.
func NewServer ¶
func NewServer(conn io.ReadWriteCloser) *Server
NewServer returns a new Packer RPC server.
func (*Server) RegisterArtifact ¶
func (*Server) RegisterBuild ¶
func (*Server) RegisterBuilder ¶
func (*Server) RegisterCache ¶
func (*Server) RegisterCommunicator ¶
func (s *Server) RegisterCommunicator(c packer.Communicator)
func (*Server) RegisterHook ¶
func (*Server) RegisterPostProcessor ¶
func (s *Server) RegisterPostProcessor(p packer.PostProcessor)
func (*Server) RegisterProvisioner ¶
func (s *Server) RegisterProvisioner(p packer.Provisioner)
func (*Server) RegisterUi ¶
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.
type UiMachineArgs ¶
The arguments sent to Ui.Machine