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
86ebfe0d
Commit
86ebfe0d
authored
Jul 23, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: remove unused test file
parent
2227e5ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
packer/rpc/rpc_test.go
packer/rpc/rpc_test.go
+0
-43
No files found.
packer/rpc/rpc_test.go
deleted
100644 → 0
View file @
2227e5ab
package
rpc
import
(
"net"
"net/rpc"
)
// This starts a RPC server for the given interface listening on the
// given address. The RPC server is ready when "readyChan" receives a message
// and the RPC server will quit when "stopChan" receives a message.
//
// This function should be run in a goroutine.
func
testRPCServer
(
laddr
string
,
name
string
,
iface
interface
{},
readyChan
chan
int
,
stopChan
<-
chan
int
)
{
listener
,
err
:=
net
.
Listen
(
"tcp"
,
laddr
)
if
err
!=
nil
{
panic
(
err
)
}
// Close the listener when we exit so that the RPC server ends
defer
listener
.
Close
()
// Start the RPC server
server
:=
rpc
.
NewServer
()
server
.
RegisterName
(
name
,
iface
)
go
func
()
{
for
{
conn
,
err
:=
listener
.
Accept
()
if
err
!=
nil
{
// If there is an error, just ignore it.
break
}
go
server
.
ServeConn
(
conn
)
}
}()
// We're ready!
readyChan
<-
1
// Block on waiting to receive from the channel
<-
stopChan
}
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