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

This commit is contained in:
SongGuyang
2020-06-15 10:13:19 +08:00
committed by GitHub
parent 19cc1ae781
commit 1583cd14ef
14 changed files with 230 additions and 7 deletions
+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