RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Attributes
Datacratic::ServiceBase Struct Reference
Inheritance diagram for Datacratic::ServiceBase:
Datacratic::EventRecorder Datacratic::SubServiceBase EchoService EchoService EchoService MockRestService Publisher RTBKIT::AdServerConnector RTBKIT::AgentConfigurationService RTBKIT::AugmentationLoop RTBKIT::Augmentor RTBKIT::BiddingAgent RTBKIT::DataLogger RTBKIT::ExchangeConnector RTBKIT::MasterBanker RTBKIT::MockExchange RTBKIT::MonitorEndpoint RTBKIT::PostAuctionLoop RTBKIT::Router RTBKIT::RouterStack

List of all members.

Public Member Functions

 ServiceBase (const std::string &serviceName, std::shared_ptr< ServiceProxies >=std::shared_ptr< ServiceProxies >())
 ServiceBase (const std::string &subServiceName, ServiceBase &parent)
void setServices (std::shared_ptr< ServiceProxies > services)
std::shared_ptr< ServiceProxiesgetServices () const
std::string serviceName () const
void registerServiceProvider (const std::string &name, const std::vector< std::string > &serviceClasses)
void unregisterServiceProvider (const std::string &name, const std::vector< std::string > &serviceClasses)
std::shared_ptr< zmq::context_tgetZmqContext () const
void logException (std::exception_ptr exc, const std::string &context)
virtual Json::Value getServiceStatus () const
virtual void addChildServiceStatus (Json::Value &result) const

Protected Attributes

std::shared_ptr< ServiceProxiesservices_
std::string serviceName_
ServiceBaseparent_
std::vector< ServiceBase * > children_

Detailed Description

Definition at line 546 of file service_base.h.


Constructor & Destructor Documentation

Datacratic::ServiceBase::ServiceBase ( const std::string &  serviceName,
std::shared_ptr< ServiceProxies services = std::shared_ptr<ServiceProxies>() 
)

Construct as a top level parent.

Definition at line 596 of file service_base.cc.

Datacratic::ServiceBase::ServiceBase ( const std::string &  subServiceName,
ServiceBase parent 
)

Construct as a child of an existing parent.

Definition at line 609 of file service_base.cc.


Member Function Documentation

void Datacratic::ServiceBase::addChildServiceStatus ( Json::Value result) const [virtual]

Function that iterates over all children and adds their service status to the given JSON object with keys as their names.

Mutates the result argument in-place.

Definition at line 665 of file service_base.cc.

Function to be called by something that wants to know the current status of this service. Returns a JSON object that could be inspected by a human or consumed by a service.

Reimplemented in RTBKIT::Router, RTBKIT::PostAuctionLoop, and RTBKIT::HttpExchangeConnector.

Definition at line 654 of file service_base.cc.

void Datacratic::ServiceBase::registerServiceProvider ( const std::string &  name,
const std::vector< std::string > &  serviceClasses 
)

Register this as a service, that provides the given service classes.

This will create sufficient entries in the configuration that something needing to find providers of any of the given services will be able to find this service.

Definition at line 631 of file service_base.cc.

void Datacratic::ServiceBase::unregisterServiceProvider ( const std::string &  name,
const std::vector< std::string > &  serviceClasses 
)

Unregister service from configuration service.

Definition at line 644 of file service_base.cc.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator