diff options
Diffstat (limited to 'include/grpcpp/create_channel.h')
-rw-r--r-- | include/grpcpp/create_channel.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/grpcpp/create_channel.h b/include/grpcpp/create_channel.h index 7a505a7127..43188d09e7 100644 --- a/include/grpcpp/create_channel.h +++ b/include/grpcpp/create_channel.h @@ -22,6 +22,7 @@ #include <memory> #include <grpcpp/channel.h> +#include <grpcpp/impl/codegen/client_interceptor.h> #include <grpcpp/security/credentials.h> #include <grpcpp/support/channel_arguments.h> #include <grpcpp/support/config.h> @@ -53,6 +54,26 @@ std::shared_ptr<Channel> CreateCustomChannel( const std::shared_ptr<ChannelCredentials>& creds, const ChannelArguments& args); +namespace experimental { +/// Create a new \em custom \a Channel pointing to \a target with \a +/// interceptors being invoked per call. +/// +/// \warning For advanced use and testing ONLY. Override default channel +/// arguments only if necessary. +/// +/// \param target The URI of the endpoint to connect to. +/// \param creds Credentials to use for the created channel. If it does not +/// hold an object or is invalid, a lame channel (one on which all operations +/// fail) is returned. +/// \param args Options for channel creation. +std::shared_ptr<Channel> CreateCustomChannelWithInterceptors( + const grpc::string& target, + const std::shared_ptr<ChannelCredentials>& creds, + const ChannelArguments& args, + std::unique_ptr<std::vector< + std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>> + interceptor_creators); +} // namespace experimental } // namespace grpc #endif // GRPCPP_CREATE_CHANNEL_H |