RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions | Public Attributes
RTBKIT::MonitorProviderClient Struct Reference
Inheritance diagram for RTBKIT::MonitorProviderClient:
Datacratic::RestProxy Datacratic::MessageLoop Datacratic::Epoller Datacratic::AsyncEventSource

List of all members.

Public Types

typedef std::unique_lock
< std::mutex > 
Guard

Public Member Functions

 MonitorProviderClient (const std::shared_ptr< zmq::context_t > &context, MonitorProvider &provider)
void init (std::shared_ptr< ConfigurationService > &config, const std::string &serviceName="monitor")
void shutdown ()
void postStatus ()
void onResponseReceived (std::exception_ptr ext, int responseCode, const std::string &body)

Public Attributes

MonitorProviderprovider_
bool inhibit_
std::string restUrlPath_
RestProxy::OnDone onDone
bool pendingRequest
std::mutex requestLock

Detailed Description

Definition at line 37 of file monitor_provider.h.


Member Typedef Documentation

typedef std::unique_lock<std::mutex> RTBKIT::MonitorProviderClient::Guard

the mutex used when pendingRequest is tested and modified

Reimplemented from Datacratic::MessageLoop.

Definition at line 75 of file monitor_provider.h.


Member Function Documentation

void RTBKIT::MonitorProviderClient::onResponseReceived ( std::exception_ptr  ext,
int  responseCode,
const std::string &  body 
)

method executed when we receive the response from the Monitor

Definition at line 78 of file monitor_provider.cc.

this method is invoked periodically to query the MonitorProvider and "POST" the result to the Monitor

Definition at line 59 of file monitor_provider.cc.

shutdown the MessageLoop but make sure all requests have been completed beforehand.

Reimplemented from Datacratic::RestProxy.

Definition at line 51 of file monitor_provider.cc.


Member Data Documentation

flag enabling the inhibition of requests to the Monitor service

Definition at line 63 of file monitor_provider.h.

bound instance of onResponseReceived

Definition at line 69 of file monitor_provider.h.

whether a request roundtrip to the Monitor is currently active

Definition at line 72 of file monitor_provider.h.

monitored service proxy

Definition at line 60 of file monitor_provider.h.

monitored service name

Definition at line 66 of file monitor_provider.h.


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