Fledge
An open source edge computing platform for industrial users
ManagementApi Class Reference

Management API server for a C++ microservice. More...

#include <management_api.h>

Inheritance diagram for ManagementApi:
Collaboration diagram for ManagementApi:

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 ManagementApigetInstance ()
 Return the signleton instance of the management interface. More...
 

Protected Attributes

std::string m_name
 
Loggerm_logger
 
time_t m_startTime
 
HttpServer * m_server
 
JSONProviderm_statsProvider
 
ServiceHandlerm_serviceHandler
 
std::thread * m_thread
 

Static Protected Attributes

static ManagementApim_instance = 0
 

Detailed Description

Management API server for a C++ microservice.

Member Function Documentation

◆ getInstance()

ManagementApi * ManagementApi::getInstance ( )
static

Return the signleton instance of the management interface.

Note if one has not been explicitly created then this will return 0.


The documentation for this class was generated from the following files: