Formatting issues

pull/18444/head
Karthik Ravi Shankar 6 years ago
parent 3377e49bc7
commit 5f6a57a4d0
  1. 2
      include/grpcpp/create_channel.h
  2. 14
      include/grpcpp/create_channel_impl.h
  3. 2
      include/grpcpp/impl/codegen/client_context.h
  4. 2
      include/grpcpp/impl/server_builder_plugin.h
  5. 6
      include/grpcpp/security/credentials.h
  6. 5
      include/grpcpp/security/credentials_impl.h
  7. 3
      include/grpcpp/support/channel_arguments.h
  8. 1
      include/grpcpp/support/channel_arguments_impl.h
  9. 2
      src/cpp/client/create_channel_posix.cc
  10. 3
      src/cpp/client/cronet_credentials.cc
  11. 6
      src/cpp/client/insecure_credentials.cc
  12. 2
      src/cpp/client/secure_credentials.cc
  13. 6
      src/cpp/client/secure_credentials.h

@ -32,7 +32,7 @@ static inline std::shared_ptr<::grpc::Channel> CreateChannel(
static inline std::shared_ptr<::grpc::Channel> CreateCustomChannel(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const std::shared_ptr<ChannelCredentials>& creds,
const ChannelArguments& args) {
return ::grpc_impl::CreateCustomChannelImpl(target, creds, args);
}

@ -35,9 +35,9 @@ namespace grpc_impl {
/// \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.
std::shared_ptr<grpc::Channel> CreateChannelImpl(
std::shared_ptr<::grpc::Channel> CreateChannelImpl(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds);
const std::shared_ptr<::grpc::ChannelCredentials>& creds);
/// Create a new \em custom \a Channel pointing to \a target.
///
@ -49,10 +49,10 @@ std::shared_ptr<grpc::Channel> CreateChannelImpl(
/// 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<grpc::Channel> CreateCustomChannelImpl(
std::shared_ptr<::grpc::Channel> CreateCustomChannelImpl(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args);
const std::shared_ptr<::grpc::ChannelCredentials>& creds,
const ::grpc::ChannelArguments& args);
namespace experimental {
/// Create a new \em custom \a Channel pointing to \a target with \a
@ -66,10 +66,10 @@ namespace experimental {
/// 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<grpc::Channel> CreateCustomChannelWithInterceptors(
std::shared_ptr<::grpc::Channel> CreateCustomChannelWithInterceptors(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args,
const ::grpc::ChannelArguments& args,
std::vector<
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);

@ -60,7 +60,7 @@ struct grpc_call;
namespace grpc_impl {
class CallCredentials;
}
} // namespace grpc_impl
namespace grpc {
class Channel;

@ -26,8 +26,8 @@
namespace grpc_impl {
class ChannelArguments;
class ServerInitializer;
class ServerBuilder;
class ServerInitializer;
} // namespace grpc_impl
namespace grpc {

@ -44,10 +44,14 @@ GoogleComputeEngineCredentials() {
return ::grpc_impl::GoogleComputeEngineCredentials();
}
/// Constant for maximum auth token lifetime.
constexpr long kMaxAuthTokenLifetimeSecs =
::grpc_impl::kMaxAuthTokenLifetimeSecs;
static inline std::shared_ptr<grpc_impl::CallCredentials>
ServiceAccountJWTAccessCredentials(
const grpc::string& json_key,
long token_lifetime_seconds = ::grpc_impl::kMaxAuthTokenLifetimeSecs) {
long token_lifetime_seconds = grpc::kMaxAuthTokenLifetimeSecs) {
return ::grpc_impl::ServiceAccountJWTAccessCredentials(
json_key, token_lifetime_seconds);
}

@ -41,7 +41,7 @@ class CallCredentials;
class SecureCallCredentials;
class SecureChannelCredentials;
std::shared_ptr<::grpc::Channel> CreateCustomChannel(
std::shared_ptr<::grpc::Channel> CreateCustomChannelImpl(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds,
const grpc::ChannelArguments& args);
@ -171,7 +171,6 @@ std::shared_ptr<ChannelCredentials> SslCredentials(
/// services.
std::shared_ptr<CallCredentials> GoogleComputeEngineCredentials();
/// Constant for maximum auth token lifetime.
constexpr long kMaxAuthTokenLifetimeSecs = 3600;
/// Builds Service Account JWT Access credentials.
@ -181,7 +180,7 @@ constexpr long kMaxAuthTokenLifetimeSecs = 3600;
/// \a kMaxAuthTokenLifetimeSecs or will be cropped to this value.
std::shared_ptr<CallCredentials> ServiceAccountJWTAccessCredentials(
const grpc::string& json_key,
long token_lifetime_seconds = kMaxAuthTokenLifetimeSecs);
long token_lifetime_seconds = grpc_impl::kMaxAuthTokenLifetimeSecs);
/// Builds refresh token credentials.
/// json_refresh_token is the JSON string containing the refresh token along

@ -23,8 +23,9 @@
namespace grpc_impl {
class SecureChannelCredentials;
class ResourceQuota;
}
} // namespace grpc_impl
namespace grpc {

@ -34,6 +34,7 @@ class ChannelArgumentsTest;
} // namespace grpc
namespace grpc_impl {
class SecureChannelCredentials;
/// Options for channel creation. The user can use generic setters to pass

@ -26,6 +26,8 @@
namespace grpc_impl {
class ChannelArguments;
#ifdef GPR_SUPPORT_CHANNELS_FROM_FD
std::shared_ptr<grpc::Channel> CreateInsecureChannelFromFd(

@ -57,8 +57,7 @@ class CronetChannelCredentialsImpl final : public ChannelCredentials {
};
} // namespace grpc
namespace grpc_impl {
std::shared_ptr<grpc_impl::ChannelCredentials> CronetChannelCredentials(
void* engine) {
std::shared_ptr<ChannelCredentials> CronetChannelCredentials(void* engine) {
return std::shared_ptr<ChannelCredentials>(
new grpc::CronetChannelCredentialsImpl(engine));
}

@ -31,7 +31,7 @@ namespace grpc_impl {
namespace {
class InsecureChannelCredentialsImpl final : public ChannelCredentials {
public:
std::shared_ptr<grpc::Channel> CreateChannelImpl(
std::shared_ptr<::grpc::Channel> CreateChannelImpl(
const grpc::string& target, const grpc::ChannelArguments& args) override {
return CreateChannelWithInterceptors(
target, args,
@ -39,14 +39,14 @@ class InsecureChannelCredentialsImpl final : public ChannelCredentials {
grpc::experimental::ClientInterceptorFactoryInterface>>());
}
std::shared_ptr<grpc::Channel> CreateChannelWithInterceptors(
std::shared_ptr<::grpc::Channel> CreateChannelWithInterceptors(
const grpc::string& target, const grpc::ChannelArguments& args,
std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return grpc::CreateChannelInternal(
return ::grpc::CreateChannelInternal(
"",
grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr),
std::move(interceptor_creators));

@ -50,7 +50,7 @@ SecureChannelCredentials::CreateChannelWithInterceptors(
interceptor_creators) {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return grpc::CreateChannelInternal(
return ::grpc::CreateChannelInternal(
args.GetSslTargetNameOverride(),
grpc_secure_channel_create(c_creds_, target.c_str(), &channel_args,
nullptr),

@ -37,16 +37,16 @@ class SecureChannelCredentials final : public ChannelCredentials {
}
grpc_channel_credentials* GetRawCreds() { return c_creds_; }
std::shared_ptr<grpc::Channel> CreateChannelImpl(
std::shared_ptr<::grpc::Channel> CreateChannelImpl(
const grpc::string& target, const grpc::ChannelArguments& args) override;
SecureChannelCredentials* AsSecureCredentials() override { return this; }
private:
std::shared_ptr<grpc::Channel> CreateChannelWithInterceptors(
std::shared_ptr<::grpc::Channel> CreateChannelWithInterceptors(
const grpc::string& target, const grpc::ChannelArguments& args,
std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>>
::grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) override;
grpc_channel_credentials* const c_creds_;
};

Loading…
Cancel
Save