![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <remote_output.h>
Public Member Functions | |
void | connect (int port, const std::string &hostname, double timeout=10.0) |
void | shutdown () |
void | barrier () |
void | flush () |
void | sync () |
void | close () |
virtual void | logMessage (const std::string &channel, const std::string &message) |
virtual void | notifyCloseTransport (const std::shared_ptr< TransportBase > &transport) |
Public Attributes | |
boost::function< void(const std::string)> | onConnectionError |
Logging output class that establishes a connection to another machine and sends zipped versions of the log file to that machine.
Definition at line 30 of file remote_output.h.
void Datacratic::RemoteOutput::barrier | ( | ) |
Make sure that everything that's pending has already been sent before returning from this function.
Definition at line 224 of file remote_output.cc.
void Datacratic::RemoteOutput::close | ( | ) | [virtual] |
Close the connection.
Implements Datacratic::LogOutput.
Definition at line 293 of file remote_output.cc.
void Datacratic::RemoteOutput::connect | ( | int | port, |
const std::string & | hostname, | ||
double | timeout = 10.0 |
||
) |
Connect to the remote endpoint and start sending on down those logs.
Definition at line 150 of file remote_output.cc.
void Datacratic::RemoteOutput::flush | ( | ) |
Flush out the current messages, waiting until everything is done before we stop.
Definition at line 270 of file remote_output.cc.
void Datacratic::RemoteOutput::logMessage | ( | const std::string & | channel, |
const std::string & | message | ||
) | [virtual] |
This is the method that will be called whenever we need to log a message to something.
Implements Datacratic::LogOutput.
Definition at line 330 of file remote_output.cc.
void Datacratic::RemoteOutput::notifyCloseTransport | ( | const std::shared_ptr< TransportBase > & | transport | ) | [virtual] |
Notification that a connection was closed. This can be used to give a new set of data.
Reimplemented from Datacratic::ActiveEndpoint.
Definition at line 358 of file remote_output.cc.
void Datacratic::RemoteOutput::shutdown | ( | ) |
Close everything down.
Reimplemented from Datacratic::ActiveEndpoint.
Definition at line 316 of file remote_output.cc.
void Datacratic::RemoteOutput::sync | ( | ) |
Sync all data and wait for it to finish
Definition at line 247 of file remote_output.cc.
boost::function<void (const std::string)> Datacratic::RemoteOutput::onConnectionError |
Thing to be called back on a connection error. Used to hook in to allow notification of problems.
Definition at line 70 of file remote_output.h.