![]() |
Fledge
An open source edge computing platform for industrial users
|
Management API server for a C++ microservice. More...
#include <management_api.h>
Public Member Functions | |
ManagementApi (const std::string &name, const unsigned short port) | |
Construct a microservices management API manager class. | |
~ManagementApi () | |
Management API destructor. | |
void | start () |
void | startServer () |
void | stop () |
void | stopServer () |
void | registerStats (JSONProvider *statsProvider) |
Register a statistics provider. | |
void | registerService (ServiceHandler *serviceHandler) |
unsigned short | getListenerPort () |
void | ping (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a ping request, construct a reply and return to caller. | |
void | shutdown (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a shutdown request, construct a reply and return to caller. | |
void | configChange (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a config change request, construct a reply and return to caller. | |
void | configChildCreate (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a children creation request, construct a reply and return to caller. | |
void | configChildDelete (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a children deletion request, construct a reply and return to caller. | |
void | securityChange (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
Received a security change request, construct a reply and return to caller. | |
Static Public Member Functions | |
static ManagementApi * | getInstance () |
Return the signleton instance of the management interface. More... | |
Protected Attributes | |
std::string | m_name |
Logger * | m_logger |
time_t | m_startTime |
HttpServer * | m_server |
JSONProvider * | m_statsProvider |
ServiceHandler * | m_serviceHandler |
std::thread * | m_thread |
Static Protected Attributes | |
static ManagementApi * | m_instance = 0 |
Management API server for a C++ microservice.
|
static |
Return the signleton instance of the management interface.
Note if one has not been explicitly created then this will return 0.