summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/testbench/dut_client.go
diff options
context:
space:
mode:
authorEyal Soha <eyalsoha@google.com>2020-03-17 08:52:14 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-17 08:53:27 -0700
commit3192e55ffe04b583ca4261ec0b04a6e566a6038b (patch)
tree0b30c1cc8205890c57c951572326f672483a6254 /test/packetimpact/testbench/dut_client.go
parentb55f0e5d40c17cadf68d6238564d675ed12f8f49 (diff)
Packetimpact in Go with c++ stub
PiperOrigin-RevId: 301382690
Diffstat (limited to 'test/packetimpact/testbench/dut_client.go')
-rw-r--r--test/packetimpact/testbench/dut_client.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/packetimpact/testbench/dut_client.go b/test/packetimpact/testbench/dut_client.go
new file mode 100644
index 000000000..b130a33a2
--- /dev/null
+++ b/test/packetimpact/testbench/dut_client.go
@@ -0,0 +1,28 @@
+// Copyright 2020 The gVisor Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package testbench
+
+import (
+ "google.golang.org/grpc"
+ pb "gvisor.dev/gvisor/test/packetimpact/proto/posix_server_go_proto"
+)
+
+// PosixClient is a gRPC client for the Posix service.
+type PosixClient pb.PosixClient
+
+// NewPosixClient makes a new gRPC client for the Posix service.
+func NewPosixClient(c grpc.ClientConnInterface) PosixClient {
+ return pb.NewPosixClient(c)
+}