TSDuck v3.43-4462
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::InfluxSender Class Reference

Asynchronously send requests to an InfluxDB server. More...

#include <tsInfluxSender.h>

Inheritance diagram for ts::InfluxSender:
Collaboration diagram for ts::InfluxSender:

Public Member Functions

 InfluxSender (Report &report)
 Constructor.
 
bool send (InfluxRequestPtr &request)
 Asynchronously send an InfluxDB request.
 
bool start (const InfluxArgs &args)
 Start the asynchronous sender.
 
void stop ()
 Stop the asynchronous sender.
 

Private Member Functions

bool start ()
 Start the thread.
 

Detailed Description

Asynchronously send requests to an InfluxDB server.

We cannot anticipate the response time of the server. Using a thread avoid slowing down the packet transmission.

Constructor & Destructor Documentation

◆ InfluxSender()

ts::InfluxSender::InfluxSender ( Report report)

Constructor.

Parameters
[in,out]reportWhere to report errors. A reference is internally kept in the object.

Member Function Documentation

◆ start()

bool ts::InfluxSender::start ( const InfluxArgs args)

Start the asynchronous sender.

Parameters
[in]argsConnection parameters to the InfluxDB server.
Returns
True on success, false on error.

◆ stop()

void ts::InfluxSender::stop ( )

Stop the asynchronous sender.

Wait for the internal thread to terminate.

◆ send()

bool ts::InfluxSender::send ( InfluxRequestPtr request)

Asynchronously send an InfluxDB request.

Parameters
[in,out]requestSmart pointer to the request. The ownership of the pointer is transfered to the asynchronous sender. The parameter is nullified on return.
Returns
True if the request was queued. False in case of queue overflow.

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