Coverage Report

Created: 2023-11-12 09:30

/proc/self/cwd/source/common/network/upstream_server_name.cc
Line
Count
Source (jump to first uncovered line)
1
#include "source/common/network/upstream_server_name.h"
2
3
#include "envoy/registry/registry.h"
4
#include "envoy/stream_info/filter_state.h"
5
6
#include "source/common/common/macros.h"
7
8
namespace Envoy {
9
namespace Network {
10
11
2.65k
const std::string& UpstreamServerName::key() {
12
2.65k
  CONSTRUCT_ON_FIRST_USE(std::string, "envoy.network.upstream_server_name");
13
2.65k
}
14
15
class UpstreamServerNameObjectFactory : public StreamInfo::FilterState::ObjectFactory {
16
public:
17
252
  std::string name() const override { return UpstreamServerName::key(); }
18
  std::unique_ptr<StreamInfo::FilterState::Object>
19
0
  createFromBytes(absl::string_view data) const override {
20
0
    return std::make_unique<UpstreamServerName>(data);
21
0
  }
22
};
23
24
REGISTER_FACTORY(UpstreamServerNameObjectFactory, StreamInfo::FilterState::ObjectFactory);
25
26
} // namespace Network
27
} // namespace Envoy