1
#pragma once
2

            
3
#include "envoy/common/pure.h"
4
#include "envoy/filesystem/filesystem.h"
5
#include "envoy/thread/thread.h"
6

            
7
namespace Envoy {
8
namespace Server {
9

            
10
/**
11
 * Interface for providing platform specific implementation of OS facilities.
12
 */
13
class Platform {
14
public:
15
50
  virtual ~Platform() = default;
16

            
17
  /**
18
   * @return platform specific thread factory.
19
   */
20
  virtual Thread::ThreadFactory& threadFactory() PURE;
21

            
22
  /**
23
   * @return platform specific filesystem facility.
24
   */
25
  virtual Filesystem::Instance& fileSystem() PURE;
26

            
27
  /**
28
   * @return platform specific core dump facility.
29
   */
30
  virtual bool enableCoreDump() PURE;
31
};
32

            
33
} // namespace Server
34
} // namespace Envoy