1
#pragma once
2

            
3
#include "envoy/common/pure.h"
4
#include "envoy/stream_info/filter_state.h"
5

            
6
#include "absl/strings/string_view.h"
7

            
8
namespace Envoy {
9
namespace Router {
10

            
11
/**
12
 * Contains a string in a form which is usable with FilterState and
13
 * allows lazy evaluation if needed. All values meant to be accessible to the
14
 * custom request/response header mechanism must use this type.
15
 */
16
class StringAccessor : public StreamInfo::FilterState::Object {
17
public:
18
  /**
19
   * @return the string the accessor represents.
20
   */
21
  virtual absl::string_view asString() const PURE;
22
};
23

            
24
} // namespace Router
25
} // namespace Envoy