Go to the documentation of this file.
24 #include "examples/protos/keyvaluestore.grpc.pb.h"
26 #include "keyvaluestore.grpc.pb.h"
42 PRE_SEND_INITIAL_METADATA)) {
46 stub_ = keyvaluestore::KeyValueStore::NewStub(
57 if (req_msg !=
nullptr) {
58 requested_key = req_msg->key();
64 auto copied_buffer = *
buffer;
67 &copied_buffer, &req_msg)
69 requested_key = req_msg.key();
75 std::cout <<
"Key " << requested_key <<
"found in map";
78 std::cout <<
"Key " << requested_key <<
"not found in cache";
81 req.set_key(requested_key);
119 std::unique_ptr<keyvaluestore::KeyValueStore::Stub>
stub_;
grpc::ClientContext context_
void Intercept(::grpc::experimental::InterceptorBatchMethods *methods) override
virtual void * GetRecvMessage()=0
std::unique_ptr< keyvaluestore::KeyValueStore::Stub > stub_
virtual bool QueryInterceptionHookPoint(InterceptionHookPoints type)=0
std::unique_ptr< grpc::ClientReaderWriter< keyvaluestore::Request, keyvaluestore::Response > > stream_
CachingInterceptor(grpc::experimental::ClientRpcInfo *info)
static const Status & OK
An OK pre-defined instance.
virtual ByteBuffer * GetSerializedSendMessage()=0
grpc::experimental::Interceptor * CreateClientInterceptor(grpc::experimental::ClientRpcInfo *info) override
virtual std::unique_ptr< ChannelInterface > GetInterceptedChannel()=0
std::map< std::string, std::string > cached_map_
virtual const void * GetSendMessage()=0
virtual Status * GetRecvStatus()=0
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:51