gRPC-haskell/examples/hellos/hellos.proto

36 lines
669 B
Protocol Buffer
Raw Permalink Normal View History

"Hellos" C++/Haskell programs for exercising interop for streaming modes (#49) * Hellos example: skeleton and server-streaming mode use * Catch IO exceptions in dispatchLoop * Distinguish decoding errors from other errors; convert error calls to explicit throws of GRPCIOErrors * instance Exception GRPCIOError * Add error checks and error messages to hellos cpp client * Change fixed32 to uint32 * Add prelim hellos-client, hellos-server executables * Hellos cpp example: add client-streaming mode use * In unregistered high-level server, aggressively catch all exceptions raised in handlers and promote then to a new GRPCIOError constructor. * Hellos hs example: add client-streaming mode use * Hellos cpp example: add simple bidi mode use * Hellos hs example: add simple bidi mode use * wibbles * Add GRPCIOErrorEq newtype wrapper w/ Eq instance for testing purposes * Refactoring wibbles * README wibbles * DCR * Fix rebase derp * Remove libdl dep, update protobuf github link in hellos cpp Makefile. * Use Data.Coerce.coerce for GRPCIOErrorEq; remove warnings * Report expected/got errors in Haskell hellos client/server * Report expected/got errors in cpp hellos client/server * Add some instructions for running the hellos client/server * Fix warnings * Rename logShow to logMsg and use stderr for logging * Tweak compliation parameters for hellos hs executables; increase constant workload * Remove unnecessary type annotation * Simplify handleError in dispatchLoop * Remove GRPCIOErrorEq and coerce use; change GRPCIOHandlerException type
2016-07-27 00:21:35 +02:00
syntax = "proto3";
package hellos;
service Hellos {
// Server streaming: Request n repetitions of a greeting be sent, based off of a given name
rpc HelloSS(SSRqt) returns (stream SSRpy) {}
// Client streaming: Send n requests and receive a total request count when done
rpc HelloCS(stream CSRqt) returns (CSRpy) {}
// Simple bidi streaming: ping-pong echo
rpc HelloBi(stream BiRqtRpy) returns (stream BiRqtRpy) {}
}
message SSRqt {
string name = 1;
uint32 num_replies = 2;
}
message SSRpy {
string greeting = 1;
}
message CSRqt {
string message = 1;
}
message CSRpy {
uint32 num_requests = 1;
}
message BiRqtRpy {
string message = 1;
}