check for running on machine before starting

This commit is contained in:
Jeff Raymakers
2025-03-09 10:59:38 -07:00
parent 62f9a73a57
commit 8c1f36c9cf
3 changed files with 29 additions and 0 deletions

View File

@@ -24,13 +24,16 @@ class HttpServer {
public:
HttpServer(shared_ptr<DatabaseInstance> _ddb_instance)
: ddb_instance(_ddb_instance) {}
static HttpServer *GetInstance(ClientContext &);
static void UpdateDatabaseInstanceIfRunning(shared_ptr<DatabaseInstance>);
static bool IsRunningOnMachine(ClientContext &);
static bool Started();
static void StopInstance();
static const HttpServer &Start(ClientContext &, bool *was_started = nullptr);
static bool Stop();
std::string LocalUrl() const;
private: