mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralfms.git
synced 2026-01-27 10:23:12 +00:00
Refactoring project layout.
This commit is contained in:
@@ -45,6 +45,9 @@ namespace OpenWifi {
|
||||
MicroService::initialize(*this);
|
||||
}
|
||||
|
||||
void MicroServicePostInitialization() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user