This commit is contained in:
@@ -3,27 +3,61 @@
|
||||
|
||||
#include "servers.hpp"
|
||||
#include "command_registry.hpp"
|
||||
#include "server_env_manager.hpp"
|
||||
|
||||
namespace dropshell {
|
||||
namespace dropshell
|
||||
{
|
||||
|
||||
namespace shared_commands
|
||||
{
|
||||
|
||||
typedef enum HealthStatus
|
||||
{
|
||||
HEALTHY,
|
||||
UNHEALTHY,
|
||||
NOTINSTALLED,
|
||||
ERROR,
|
||||
UNKNOWN
|
||||
} HealthStatus;
|
||||
|
||||
typedef struct ServiceStatus
|
||||
{
|
||||
HealthStatus health;
|
||||
std::vector<int> ports;
|
||||
} ServiceStatus;
|
||||
|
||||
// expose routines used by multiple commands.
|
||||
|
||||
class cRemoteTempFolder
|
||||
{
|
||||
public:
|
||||
cRemoteTempFolder(const server_env_manager &server_env); // create a temp folder on the remote server
|
||||
~cRemoteTempFolder(); // delete the temp folder on the remote server
|
||||
std::string path() const; // get the path to the temp folder on the remote server
|
||||
private:
|
||||
std::string mPath;
|
||||
const server_env_manager &mServerEnv;
|
||||
};
|
||||
|
||||
// defined in install.cpp
|
||||
bool rsync_tree_to_remote(
|
||||
const std::string &local_path,
|
||||
const std::string &remote_path,
|
||||
server_env_manager &server_env,
|
||||
const std::string &remote_path,
|
||||
server_env_manager &server_env,
|
||||
bool silent);
|
||||
|
||||
// defined in install.cpp
|
||||
std::string get_arch();
|
||||
|
||||
// defined in health.cpp
|
||||
std::string healthtick(const std::string& server, const std::string& service);
|
||||
std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
|
||||
|
||||
std::string healthtick(const std::string &server, const std::string &service);
|
||||
std::string HealthStatus2String(HealthStatus status);
|
||||
HealthStatus is_healthy(const std::string &server, const std::string &service);
|
||||
std::string healthmark(const std::string &server, const std::string &service);
|
||||
|
||||
// defined in standard_autocomplete.cpp
|
||||
void std_autocomplete(const CommandContext& ctx);
|
||||
void std_autocomplete_allowall(const CommandContext& ctx);
|
||||
void std_autocomplete(const CommandContext &ctx);
|
||||
void std_autocomplete_allowall(const CommandContext &ctx);
|
||||
|
||||
|
||||
} // namespace shared_commands
|
||||
} // namespace dropshell
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user