Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
496a320a
Commit
496a320a
authored
May 12, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: Implement full communicator interface
parent
2799cccf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
packer/rpc/communicator.go
packer/rpc/communicator.go
+4
-0
packer/rpc/communicator_test.go
packer/rpc/communicator_test.go
+4
-4
No files found.
packer/rpc/communicator.go
View file @
496a320a
...
...
@@ -87,6 +87,10 @@ func (c *communicator) Start(cmd string) (rc *packer.RemoteCommand, err error) {
return
}
func
(
c
*
communicator
)
Upload
(
string
,
io
.
Reader
)
{}
func
(
c
*
communicator
)
Download
(
string
,
io
.
Writer
)
{}
func
(
c
*
CommunicatorServer
)
Start
(
cmd
*
string
,
reply
*
CommunicatorStartResponse
)
(
err
error
)
{
// Start executing the command.
command
,
err
:=
c
.
c
.
Start
(
*
cmd
)
...
...
packer/rpc/communicator_test.go
View file @
496a320a
...
...
@@ -98,10 +98,10 @@ func TestCommunicatorRPC(t *testing.T) {
}
func
TestCommunicator_ImplementsCommunicator
(
t
*
testing
.
T
)
{
//
assert := asserts.NewTestingAsserts(t, true)
assert
:=
asserts
.
NewTestingAsserts
(
t
,
true
)
//
var r packer.Communicator
//
c := Communicator(nil)
var
r
packer
.
Communicator
c
:=
Communicator
(
nil
)
//
assert.Implementor(c, &r, "should be a Communicator")
assert
.
Implementor
(
c
,
&
r
,
"should be a Communicator"
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment