![]() |
Fledge
An open source edge computing platform for industrial users
|
Management API server for a C++ microservice. More...
#include <core_management_api.h>


Public Member Functions | |
| CoreManagementApi (const std::string &name, const unsigned short port) | |
| Construct a microservices management API manager class. | |
| void | registerMicroService (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a service registration request. More... | |
| void | unRegisterMicroService (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a service unregister request. | |
| void | getAllCategories (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a GET /fledge/service/category. | |
| void | getCategory (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a GET /fledge/service/category/{categoryName}. | |
| void | getCategoryItem (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a GET /fledge/service/category/{categoryName}/{itemName]. | |
| void | deleteCategoryItemValue (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received a DELETE /fledge/service/category/{categoryName}/{configItem}/value. | |
| void | setCategoryItemValue (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Received PUT /fledge/service/category/{categoryName}/{configItem} Payload is {"value" : "some_data"} Send to client the JSON string of category item properties. | |
| void | deleteCategory (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Delete a config category Received DELETE /fledge/service/category/{categoryName} Send to client the JSON string of all remaining categories. | |
| void | deleteChildCategory (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Delete child categories of a config category Received DELETE /fledge/service/category/{categoryName}/children/{childCategory} Send to client the JSON string of all remaining categories. | |
| void | createCategory (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Create a new configuration category Received POST /fledge/service/category. More... | |
| void | addChildCategory (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Add child categories to a given category name Received POST /fledge/service/category/{categoryName}/children. More... | |
| void | defaultResource (std::shared_ptr< HttpServer::Response > response, std::shared_ptr< HttpServer::Request > request) |
| Handle a bad URL endpoint call. | |
Public Member Functions inherited from ManagementApi | |
| ManagementApi (const std::string &name, const unsigned short port) | |
| Construct a microservices management API manager class. More... | |
| ~ManagementApi () | |
| Management API destructor. | |
| void | start () |
| void | startServer () |
| void | stop () |
| void | stopServer () |
| void | registerStats (JSONProvider *statsProvider) |
| Register a statistics provider. More... | |
| void | registerProvider (JSONProvider *provider) |
| Register a generic provider. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions | |
| static CoreManagementApi * | getInstance () |
| Return the singleton instance of the core management interface. More... | |
Static Public Member Functions inherited from ManagementApi | |
| static ManagementApi * | getInstance () |
| Return the signleton instance of the management interface. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ManagementApi | |
| 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 inherited from ManagementApi | |
| static ManagementApi * | m_instance = 0 |
Management API server for a C++ microservice.
| void CoreManagementApi::addChildCategory | ( | std::shared_ptr< HttpServer::Response > | response, |
| std::shared_ptr< HttpServer::Request > | request | ||
| ) |
Add child categories to a given category name Received POST /fledge/service/category/{categoryName}/children.
Send to client the JSON string with child categories
| void CoreManagementApi::createCategory | ( | std::shared_ptr< HttpServer::Response > | response, |
| std::shared_ptr< HttpServer::Request > | request | ||
| ) |
Create a new configuration category Received POST /fledge/service/category.
Send to client the JSON string of new category's items
|
static |
Return the singleton instance of the core management interface.
Note if one has not been explicitly created then this will return 0.
| void CoreManagementApi::registerMicroService | ( | std::shared_ptr< HttpServer::Response > | response, |
| std::shared_ptr< HttpServer::Request > | request | ||
| ) |
Received a service registration request.
Storage layer is registered Setup ConfigurationManager instance and URL entry points