Refactoring project layout.

This commit is contained in:
stephb9959
2021-10-23 21:55:46 -07:00
parent b89a638e68
commit 3df9647c13
3 changed files with 11 additions and 2 deletions

2
build
View File

@@ -1 +1 @@
124
126

View File

@@ -45,6 +45,9 @@ namespace OpenWifi {
MicroService::initialize(*this);
}
void MicroServicePostInitialization() {
}
}
int main(int argc, char **argv) {

View File

@@ -2227,6 +2227,8 @@ namespace OpenWifi {
};
inline class RESTAPI_InternalServer* RESTAPI_InternalServer::instance_ = nullptr;
inline RESTAPI_InternalServer * RESTAPI_InternalServer() { return RESTAPI_InternalServer::instance(); };
class InternalRequestHandlerFactory : public Poco::Net::HTTPRequestHandlerFactory {
@@ -2271,7 +2273,6 @@ namespace OpenWifi {
return 0;
}
struct MicroServiceMeta {
uint64_t Id=0;
std::string Type;
@@ -2526,11 +2527,14 @@ namespace OpenWifi {
MyHash_ = CreateHash(MyPublicEndPoint_);
}
void MicroServicePostInitialization();
inline void MicroService::initialize(Poco::Util::Application &self) {
// add the default services
SubSystems_.push_back(KafkaManager());
SubSystems_.push_back(ALBHealthCheckServer());
SubSystems_.push_back(RESTAPI_server());
SubSystems_.push_back(RESTAPI_InternalServer());
Poco::Net::initializeSSL();
Poco::Net::HTTPStreamFactory::registerFactory();
@@ -2566,6 +2570,8 @@ namespace OpenWifi {
Types::TopicNotifyFunction F = [this](std::string s1,std::string s2) { this->BusMessageReceived(s1,s2); };
KafkaManager()->RegisterTopicWatcher(KafkaTopics::SERVICE_EVENTS, F);
MicroServicePostInitialization();
}
inline void MicroService::uninitialize() {