13 #ifndef HERMES_ADAPTER_CONSTANTS_H
14 #define HERMES_ADAPTER_CONSTANTS_H
16 #include <glog/logging.h>
27 const char* kHermesConf =
"HERMES_CONF";
36 const char* kHermesClient =
"HERMES_CLIENT";
47 const char* kHermesAsyncFlush =
"HERMES_ASYNC_FLUSH";
53 const char* kHermesExtension =
".hermes";
64 const char* kAdapterMode =
"ADAPTER_MODE";
73 const char* kAdapterModeInfo =
"ADAPTER_MODE_INFO";
77 const char kPathDelimiter =
',';
81 const char* kAdapterDefaultMode =
"DEFAULT";
82 const char* kAdapterBypassMode =
"BYPASS";
83 const char* kAdapterScratchMode =
"SCRATCH";
84 const char* kAdapterWorkflowMode =
"WORKFLOW";
93 const char* kStopDaemon =
"HERMES_STOP_DAEMON";
105 const size_t kPageSize = []() {
106 const char* kPageSizeVar =
"HERMES_PAGE_SIZE";
107 const size_t kDefaultPageSize = 1 * 1024 * 1024;
109 size_t result = kDefaultPageSize;
110 char* page_size = getenv(kPageSizeVar);
113 result = (size_t)std::strtoull(page_size, NULL, 0);
115 LOG(FATAL) <<
"Invalid value of " << kPageSizeVar <<
": " << page_size;
126 const char* kHermesWriteOnlyVar =
"HERMES_WRITE_ONLY";