diff options
| author | krasnobaev <[email protected]> | 2022-02-10 16:50:19 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:19 +0300 | 
| commit | 408b62b8b2bb0540f9251bb682b01b4d585d3754 (patch) | |
| tree | 4409f4cc2667ddc58bf75acb65ae7139af4fbb9d /library/cpp/grpc | |
| parent | db222959b3748242024c781f563f31a342492476 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/grpc')
| -rw-r--r-- | library/cpp/grpc/client/grpc_common.h | 26 | ||||
| -rw-r--r-- | library/cpp/grpc/server/grpc_async_ctx_base.h | 8 | ||||
| -rw-r--r-- | library/cpp/grpc/server/grpc_request.h | 8 | ||||
| -rw-r--r-- | library/cpp/grpc/server/grpc_request_base.h | 10 | ||||
| -rw-r--r-- | library/cpp/grpc/server/grpc_server.cpp | 4 | ||||
| -rw-r--r-- | library/cpp/grpc/server/grpc_server.h | 16 | 
6 files changed, 36 insertions, 36 deletions
diff --git a/library/cpp/grpc/client/grpc_common.h b/library/cpp/grpc/client/grpc_common.h index ffcdafe0458..35faabfca5f 100644 --- a/library/cpp/grpc/client/grpc_common.h +++ b/library/cpp/grpc/client/grpc_common.h @@ -3,7 +3,7 @@  #include <grpc++/grpc++.h>  #include <grpc++/resource_quota.h> -#include <util/datetime/base.h> +#include <util/datetime/base.h>   #include <unordered_map>  #include <util/generic/string.h> @@ -20,7 +20,7 @@ struct TGRpcClientConfig {      ui32 MaxInFlight = 0;      bool EnableSsl = false;      TString SslCaCert;  //Implicitly enables Ssl if not empty -    grpc_compression_algorithm CompressionAlgoritm = GRPC_COMPRESS_NONE; +    grpc_compression_algorithm CompressionAlgoritm = GRPC_COMPRESS_NONE;       ui64 MemQuota = 0;      std::unordered_map<TString, TString> StringChannelParams;      std::unordered_map<TString, int> IntChannelParams; @@ -34,7 +34,7 @@ struct TGRpcClientConfig {      TGRpcClientConfig& operator=(TGRpcClientConfig&&) = default;      TGRpcClientConfig(const TString& locator, TDuration timeout = TDuration::Max(), -            ui64 maxMessageSize = DEFAULT_GRPC_MESSAGE_SIZE_LIMIT, ui32 maxInFlight = 0, TString caCert = "", +            ui64 maxMessageSize = DEFAULT_GRPC_MESSAGE_SIZE_LIMIT, ui32 maxInFlight = 0, TString caCert = "",               grpc_compression_algorithm compressionAlgorithm = GRPC_COMPRESS_NONE, bool enableSsl = false)          : Locator(locator)          , Timeout(timeout) @@ -42,7 +42,7 @@ struct TGRpcClientConfig {          , MaxInFlight(maxInFlight)          , EnableSsl(enableSsl)          , SslCaCert(caCert) -        , CompressionAlgoritm(compressionAlgorithm) +        , CompressionAlgoritm(compressionAlgorithm)       {}  }; @@ -50,16 +50,16 @@ inline std::shared_ptr<grpc::ChannelInterface> CreateChannelInterface(const TGRp      grpc::ChannelArguments args;      args.SetMaxReceiveMessageSize(config.MaxInboundMessageSize ? config.MaxInboundMessageSize : config.MaxMessageSize);      args.SetMaxSendMessageSize(config.MaxOutboundMessageSize ? config.MaxOutboundMessageSize : config.MaxMessageSize); -    args.SetCompressionAlgorithm(config.CompressionAlgoritm); - -    for (const auto& kvp: config.StringChannelParams) { -        args.SetString(kvp.first, kvp.second); -    } - -    for (const auto& kvp: config.IntChannelParams) { -        args.SetInt(kvp.first, kvp.second); -    } +    args.SetCompressionAlgorithm(config.CompressionAlgoritm);  +    for (const auto& kvp: config.StringChannelParams) {  +        args.SetString(kvp.first, kvp.second);  +    }  +  +    for (const auto& kvp: config.IntChannelParams) {  +        args.SetInt(kvp.first, kvp.second);  +    }  +       if (config.MemQuota) {          grpc::ResourceQuota quota;          quota.Resize(config.MemQuota); diff --git a/library/cpp/grpc/server/grpc_async_ctx_base.h b/library/cpp/grpc/server/grpc_async_ctx_base.h index 51356d4ce5a..8fbce61f94b 100644 --- a/library/cpp/grpc/server/grpc_async_ctx_base.h +++ b/library/cpp/grpc/server/grpc_async_ctx_base.h @@ -69,10 +69,10 @@ public:          return values;      } -    grpc_compression_level GetCompressionLevel() const { -        return Context.compression_level(); -    } - +    grpc_compression_level GetCompressionLevel() const {  +        return Context.compression_level();  +    }  +       void Shutdown() override {          // Shutdown may only be called after request has started successfully          if (Context.c_call()) diff --git a/library/cpp/grpc/server/grpc_request.h b/library/cpp/grpc/server/grpc_request.h index 5bd8d3902b5..345637e86d6 100644 --- a/library/cpp/grpc/server/grpc_request.h +++ b/library/cpp/grpc/server/grpc_request.h @@ -167,10 +167,10 @@ public:          return TBaseAsyncContext<TService>::GetPeerMetaValues(key);      } -    grpc_compression_level GetCompressionLevel() const override { -        return TBaseAsyncContext<TService>::GetCompressionLevel(); -    } - +    grpc_compression_level GetCompressionLevel() const override {  +        return TBaseAsyncContext<TService>::GetCompressionLevel();  +    }  +       //! Get pointer to the request's message.      const NProtoBuf::Message* GetRequest() const override {          return Request_; diff --git a/library/cpp/grpc/server/grpc_request_base.h b/library/cpp/grpc/server/grpc_request_base.h index fcfce1c181a..5d5e11239e9 100644 --- a/library/cpp/grpc/server/grpc_request_base.h +++ b/library/cpp/grpc/server/grpc_request_base.h @@ -3,8 +3,8 @@  #include <google/protobuf/message.h>  #include <library/cpp/threading/future/future.h> -#include <grpc++/server_context.h> - +#include <grpc++/server_context.h>  +   namespace grpc {  class ByteBuffer;  } @@ -79,9 +79,9 @@ public:      //! Returns peer optional metavalue      virtual TVector<TStringBuf> GetPeerMetaValues(TStringBuf key) const = 0; -    //! Returns request compression level -    virtual grpc_compression_level GetCompressionLevel() const = 0; - +    //! Returns request compression level  +    virtual grpc_compression_level GetCompressionLevel() const = 0;  +       //! Returns protobuf arena allocator associated with current request      //! Lifetime of the arena is lifetime of the context      virtual google::protobuf::Arena* GetArena() = 0; diff --git a/library/cpp/grpc/server/grpc_server.cpp b/library/cpp/grpc/server/grpc_server.cpp index 7437b7a8f5e..07dca78a376 100644 --- a/library/cpp/grpc/server/grpc_server.cpp +++ b/library/cpp/grpc/server/grpc_server.cpp @@ -142,8 +142,8 @@ void TGRpcServer::Start() {          */          Cerr << "GRpc memory quota temporarily disabled due to issues with grpc quoter" << Endl;      } -    Options_.ServerBuilderMutator(builder); -    builder.SetDefaultCompressionLevel(Options_.DefaultCompressionLevel); +    Options_.ServerBuilderMutator(builder);  +    builder.SetDefaultCompressionLevel(Options_.DefaultCompressionLevel);       Server_ = builder.BuildAndStart();      if (!Server_) { diff --git a/library/cpp/grpc/server/grpc_server.h b/library/cpp/grpc/server/grpc_server.h index d6814a90a0d..a43cdef142a 100644 --- a/library/cpp/grpc/server/grpc_server.h +++ b/library/cpp/grpc/server/grpc_server.h @@ -85,14 +85,14 @@ struct TServerOptions {      //! GRPC auth      DECLARE_FIELD(UseAuth, bool, false); - -    //! Default compression level. Used when no compression options provided by client. -    //  Mapping to particular compression algorithm depends on client. -    DECLARE_FIELD(DefaultCompressionLevel, grpc_compression_level, GRPC_COMPRESS_LEVEL_NONE); - -    //! Custom configurator for ServerBuilder. -    DECLARE_FIELD(ServerBuilderMutator, std::function<void(grpc::ServerBuilder&)>, [](grpc::ServerBuilder&){}); - +  +    //! Default compression level. Used when no compression options provided by client.  +    //  Mapping to particular compression algorithm depends on client.  +    DECLARE_FIELD(DefaultCompressionLevel, grpc_compression_level, GRPC_COMPRESS_LEVEL_NONE);  +  +    //! Custom configurator for ServerBuilder.  +    DECLARE_FIELD(ServerBuilderMutator, std::function<void(grpc::ServerBuilder&)>, [](grpc::ServerBuilder&){});  +       DECLARE_FIELD(ExternalListener, IExternalListener::TPtr, nullptr);      //! Logger which will be used to write logs about requests handling (iff appropriate log level is enabled).  | 
