Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/bidirectional/shared/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (m *GRPCClient) Get(key string) (int64, error) {

// Here is the gRPC server that GRPCClient talks to.
type GRPCServer struct {
proto.UnimplementedCounterServer
// This is the real implementation
Impl Counter

Expand Down Expand Up @@ -94,6 +95,7 @@ func (m *GRPCAddHelperClient) Sum(a, b int64) (int64, error) {

// Here is the gRPC server that GRPCClient talks to.
type GRPCAddHelperServer struct {
proto.UnimplementedAddHelperServer
// This is the real implementation
Impl AddHelper
}
Expand Down
1 change: 1 addition & 0 deletions examples/grpc/shared/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (m *GRPCClient) Get(key string) ([]byte, error) {

// Here is the gRPC server that GRPCClient talks to.
type GRPCServer struct {
proto.UnimplementedKVServer
// This is the real implementation
Impl KV
}
Expand Down
2 changes: 2 additions & 0 deletions grpc_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type sendErr struct {
// connection information to/from the plugin. Implements GRPCBrokerServer and
// streamer interfaces.
type gRPCBrokerServer struct {
plugin.UnimplementedGRPCBrokerServer

// send is used to send connection info to the gRPC stream.
send chan *sendErr

Expand Down
1 change: 1 addition & 0 deletions grpc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
// GRPCControllerServer handles shutdown calls to terminate the server when the
// plugin client is closed.
type grpcControllerServer struct {
plugin.UnimplementedGRPCControllerServer
server *GRPCServer
}

Expand Down
1 change: 1 addition & 0 deletions grpc_stdio.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const grpcStdioBuffer = 1 * 1024

// grpcStdioServer implements the Stdio service and streams stdiout/stderr.
type grpcStdioServer struct {
plugin.UnimplementedGRPCStdioServer
stdoutCh <-chan []byte
stderrCh <-chan []byte
}
Expand Down
5 changes: 4 additions & 1 deletion plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ var testGRPCPluginMap = map[string]Plugin{

// testGRPCServer is the implementation of our GRPC service.
type testGRPCServer struct {
grpctest.UnimplementedTestServer
Impl testInterface
broker *GRPCBroker
}
Expand Down Expand Up @@ -273,7 +274,9 @@ func (s *testGRPCServer) PrintStdio(
return &empty.Empty{}, nil
}

type pingPongServer struct{}
type pingPongServer struct {
grpctest.UnimplementedPingPongServer
}

func (p *pingPongServer) Ping(ctx context.Context, req *grpctest.PingRequest) (*grpctest.PongResponse, error) {
return &grpctest.PongResponse{
Expand Down