aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/server.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-09-30 22:13:44 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-09-30 22:13:44 -0700
commit1d999617e2ef67686d6f6d8be8e2dc62976380eb (patch)
treec057d4a50177fb2ef4e7a32be0eb186d0aa16aff /include/grpcpp/server.h
parent5525521456e8a5f18b829e90ba47319ff0feb5e2 (diff)
Add experimental versions with interceptors for create channel from fd and inproc channel
Diffstat (limited to 'include/grpcpp/server.h')
-rw-r--r--include/grpcpp/server.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/grpcpp/server.h b/include/grpcpp/server.h
index 72544c0f0b..8d3e856502 100644
--- a/include/grpcpp/server.h
+++ b/include/grpcpp/server.h
@@ -28,6 +28,7 @@
#include <grpc/compression.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/impl/call.h>
+#include <grpcpp/impl/codegen/client_interceptor.h>
#include <grpcpp/impl/codegen/grpc_library.h>
#include <grpcpp/impl/codegen/server_interface.h>
#include <grpcpp/impl/rpc_service_method.h>
@@ -99,6 +100,30 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
/// Establish a channel for in-process communication
std::shared_ptr<Channel> InProcessChannel(const ChannelArguments& args);
+ /// NOTE: class experimental_type is not part of the public API of this class.
+ /// TODO(yashykt): Integrate into public API when this is no longer
+ /// experimental.
+ class experimental_type {
+ public:
+ explicit experimental_type(Server* server) : server_(server) {}
+
+ /// Establish a channel for in-process communication with client
+ /// interceptors
+ std::shared_ptr<Channel> InProcessChannelWithInterceptors(
+ const ChannelArguments& args,
+ std::unique_ptr<std::vector<
+ std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>
+ interceptor_creators);
+
+ private:
+ Server* server_;
+ };
+
+ /// NOTE: The function experimental() is not stable public API. It is a view
+ /// to the experimental components of this class. It may be changed or removed
+ /// at any time.
+ experimental_type experimental() { return experimental_type(this); }
+
protected:
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.