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

ServiceRegistry Singleton class. More...

#include <service_registry.h>

Public Member Functions

bool registerService (ServiceRecord *service)
 Register a service with the service registry. More...
 
bool unRegisterService (ServiceRecord *service)
 Unregister a service with the service registry. More...
 
bool unRegisterService (const std::string &uuid)
 
ServiceRecordfindService (const std::string &name)
 Find a service that is registered with the service registry. More...
 
std::string getUUID (ServiceRecord *service)
 Return the uuid of the registration record for a given service. More...
 

Static Public Member Functions

static ServiceRegistrygetInstance ()
 Return the singleton instance of the service registry.
 

Detailed Description

ServiceRegistry Singleton class.

Member Function Documentation

◆ findService()

ServiceRecord * ServiceRegistry::findService ( const std::string &  name)

Find a service that is registered with the service registry.

Parameters
nameThe name of the service to find
Returns
ServiceRecord* The service record or null if not found

◆ getUUID()

string ServiceRegistry::getUUID ( ServiceRecord service)

Return the uuid of the registration record for a given service.

Parameters
serviceThe service to return the uuid for
Returns
string The uud of the service registration
Exceptions
eceptionIf the service could not be found

◆ registerService()

bool ServiceRegistry::registerService ( ServiceRecord service)

Register a service with the service registry.

Parameters
serviceThe service to register
Returns
bool True if the service was registered

◆ unRegisterService()

bool ServiceRegistry::unRegisterService ( ServiceRecord service)

Unregister a service with the service registry.

Parameters
serviceThe service to unregister
Returns
bool True if the service was unregistered

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