1
#pragma once
2

            
3
#include "envoy/common/pure.h"
4

            
5
#include "absl/types/optional.h"
6

            
7
namespace Envoy {
8

            
9
/**
10
 * Represents some other part of the process.
11
 */
12
class ProcessObject {
13
public:
14
4
  virtual ~ProcessObject() = default;
15
};
16

            
17
using ProcessObjectOptRef = absl::optional<std::reference_wrapper<ProcessObject>>;
18

            
19
/**
20
 * Context passed to filters to access resources from non-Envoy parts of the
21
 * process.
22
 */
23
class ProcessContext {
24
public:
25
7
  virtual ~ProcessContext() = default;
26

            
27
  /**
28
   * @return the ProcessObject for this context.
29
   */
30
  virtual ProcessObject& get() const PURE;
31
};
32

            
33
using ProcessContextOptRef = absl::optional<std::reference_wrapper<ProcessContext>>;
34

            
35
} // namespace Envoy