mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-09-24 12:56:42 +00:00
resolves #34: watch for configuration changes
Reload the configuration if a change is detected without requiring a server restart
This commit is contained in:
@@ -43,6 +43,9 @@ public:
|
||||
// invoked with the read data
|
||||
void addDescriptor(int fd, std::function<void(const char*,size_t)> cb);
|
||||
|
||||
// add a path to be watched for changes
|
||||
void addWatchPath(const char* dpath);
|
||||
|
||||
private:
|
||||
kj::Promise<void> acceptHttpClient(kj::Own<kj::ConnectionReceiver>&& listener);
|
||||
kj::Promise<void> acceptRpcClient(kj::Own<kj::ConnectionReceiver>&& listener);
|
||||
@@ -63,6 +66,8 @@ private:
|
||||
kj::TaskSet childTasks;
|
||||
kj::TaskSet httpConnections;
|
||||
kj::Maybe<kj::Promise<void>> reapWatch;
|
||||
int inotify_fd;
|
||||
kj::Maybe<kj::Promise<void>> pathWatch;
|
||||
|
||||
// TODO: restructure so this isn't necessary
|
||||
friend class ServerTest;
|
||||
|
||||
Reference in New Issue
Block a user