Add interfaces for C++ worker cluster mode (#8859)

This commit is contained in:
SongGuyang authored and GitHub committed 2020-06-14 19:13:19 -07:00
1 parent 19cc1ae781
commit 1583cd14ef
14 files changed
+230 -7

No files matched your search

+11 -2
View File
@@ -1,5 +1,7 @@
#pragma once
#include <memory>
#include <string>
namespace ray {
namespace api {
@@ -11,9 +13,16 @@ enum class WorkerMode { NONE, DRIVER, WORKER };
/// TODO(Guyang Song): Make configuration complete and use to initialize.
class RayConfig {
public:
WorkerMode workerMode = WorkerMode::DRIVER;
WorkerMode worker_mode = WorkerMode::DRIVER;
RunMode runMode = RunMode::SINGLE_PROCESS;
RunMode run_mode = RunMode::SINGLE_PROCESS;
std::string redis_address;
static std::shared_ptr<RayConfig> GetInstance();
private:
static std::shared_ptr<RayConfig> config_;
};
} // namespace api