mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 06:22:27 +00:00
gRPC callbackService support added (#8666)
* grpc callbackService support added Signed-off-by: shankeleven <shashanksati11@gmail.com> * tests: regenerate C++ gRPC golden with --grpc-callback-api (CallbackService & async_ reactor APIs); update formatting and method placement --------- Signed-off-by: shankeleven <shashanksati11@gmail.com> Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
22
grpc/tests/grpctest_callback_compile.cpp
Normal file
22
grpc/tests/grpctest_callback_compile.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "monster_test.grpc.fb.h"
|
||||
|
||||
// This test only verifies that the generated CallbackService compiles when the
|
||||
// callback API is available. It does not run any RPCs.
|
||||
|
||||
#if defined(FLATBUFFERS_GENERATED_GRPC_CALLBACK_API) && \
|
||||
defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)
|
||||
class CallbackServiceImpl
|
||||
: public MyGame::Example::MonsterStorage::CallbackService {
|
||||
public:
|
||||
// For brevity we don't override methods; user code will provide reactors.
|
||||
};
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
#if defined(FLATBUFFERS_GENERATED_GRPC_CALLBACK_API) && \
|
||||
defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)
|
||||
CallbackServiceImpl svc;
|
||||
(void)svc; // suppress unused
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user