/proc/self/cwd/source/extensions/filters/network/dubbo_proxy/dubbo_protocol_impl.h
Line | Count | Source (jump to first uncovered line) |
1 | | #pragma once |
2 | | |
3 | | #include "source/extensions/filters/network/dubbo_proxy/protocol.h" |
4 | | |
5 | | namespace Envoy { |
6 | | namespace Extensions { |
7 | | namespace NetworkFilters { |
8 | | namespace DubboProxy { |
9 | | |
10 | | class DubboProtocolImpl : public Protocol { |
11 | | public: |
12 | 0 | DubboProtocolImpl() = default; |
13 | | ~DubboProtocolImpl() override = default; |
14 | | |
15 | 0 | const std::string& name() const override { return ProtocolNames::get().fromType(type()); } |
16 | 0 | ProtocolType type() const override { return ProtocolType::Dubbo; } |
17 | | |
18 | | std::pair<ContextSharedPtr, bool> decodeHeader(Buffer::Instance& buffer, |
19 | | MessageMetadataSharedPtr metadata) override; |
20 | | bool decodeData(Buffer::Instance& buffer, ContextSharedPtr context, |
21 | | MessageMetadataSharedPtr metadata) override; |
22 | | |
23 | | bool encode(Buffer::Instance& buffer, const MessageMetadata& metadata, const std::string& content, |
24 | | RpcResponseType type) override; |
25 | | |
26 | | static constexpr uint8_t MessageSize = 16; |
27 | | static constexpr int32_t MaxBodySize = 16 * 1024 * 1024; |
28 | | }; |
29 | | |
30 | | } // namespace DubboProxy |
31 | | } // namespace NetworkFilters |
32 | | } // namespace Extensions |
33 | | } // namespace Envoy |