Allow to configure listening interface
This commit is contained in:
@@ -40,7 +40,8 @@ private:
|
||||
friend class Watcher;
|
||||
|
||||
// Lifecycle
|
||||
void DoStart(const uint16_t local_port, const std::string &remote_url);
|
||||
void DoStart(const uint16_t local_port, const std::string &local_host,
|
||||
const std::string &remote_url);
|
||||
void DoStop();
|
||||
void Run();
|
||||
void UpdateDatabaseInstance(shared_ptr<DatabaseInstance> context_db);
|
||||
@@ -69,6 +70,7 @@ private:
|
||||
shared_ptr<DatabaseInstance> LockDatabaseInstance();
|
||||
|
||||
uint16_t local_port;
|
||||
std::string local_host;
|
||||
std::string local_url;
|
||||
std::string remote_url;
|
||||
weak_ptr<DatabaseInstance> ddb_instance;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#define UI_LOCAL_PORT_SETTING_NAME "ui_local_port"
|
||||
#define UI_LOCAL_PORT_SETTING_DEFAULT 4213
|
||||
#define UI_LOCAL_HOST_SETTING_NAME "ui_local_host"
|
||||
#define UI_LOCAL_HOST_SETTING_DEFAULT "localhost"
|
||||
#define UI_REMOTE_URL_SETTING_NAME "ui_remote_url"
|
||||
#define UI_REMOTE_URL_SETTING_DEFAULT "https://ui.duckdb.org"
|
||||
#define UI_POLLING_INTERVAL_SETTING_NAME "ui_polling_interval"
|
||||
@@ -27,6 +29,7 @@ T GetSetting(const ClientContext &context, const char *setting_name) {
|
||||
|
||||
std::string GetRemoteUrl(const ClientContext &);
|
||||
uint16_t GetLocalPort(const ClientContext &);
|
||||
std::string GetLocalHost(const ClientContext &);
|
||||
uint32_t GetPollingInterval(const ClientContext &);
|
||||
|
||||
} // namespace duckdb
|
||||
|
||||
Reference in New Issue
Block a user