TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::InfluxArgs Class Reference

#include <tsInfluxArgs.h>

Collaboration diagram for ts::InfluxArgs:

Public Member Functions

 InfluxArgs (bool use_prefix=false, bool use_short_options=false)
void defineArgs (Args &args)
bool loadArgs (Args &args, bool required)

Public Attributes

UStringVector additional_tags {}
 --tag
UString bucket {}
 --bucket (-b) [INFLUX_BUCKET_NAME]
UString bucket_id {}
 --bucket-id [INFLUX_BUCKET_ID]
fs::path config_file {}
 --configs-path [INFLUX_CONFIGS_PATH]
UString config_name {}
 --active-config (-c) [INFLUX_ACTIVE_CONFIG]
UString host_url {}
 --host-url (-h) [INFLUX_HOST], URL or host name
UString org {}
 --org (-o) [INFLUX_ORG]
UString org_id {}
 --org-id [INFLUX_ORG_ID]
size_t queue_size = DEFAULT_QUEUE_SIZE
 --queue-size
UString token {}
 --token (-t) [INFLUX_TOKEN]

Static Public Attributes

static constexpr size_t DEFAULT_QUEUE_SIZE = 10
 Default maximum queued metrics messages.

Detailed Description

Command line arguments for InfluxDB connection.

Same options and resolution of defaults as InfluxDB CLI.

See also
https://docs.influxdata.com/influxdb/v2/reference/cli/influx/

Constructor & Destructor Documentation

◆ InfluxArgs()

ts::InfluxArgs::InfluxArgs ( bool use_prefix = false,
bool use_short_options = false )

Constructor.

Parameters
[in]use_prefixUse a prefix for all long options (e.g. '–influx-token' for '–token').
[in]use_short_optionsDefine short options (eg.g. '-t' for '–token').

Member Function Documentation

◆ defineArgs()

void ts::InfluxArgs::defineArgs ( Args & args)

Add command line option definitions in an Args.

Parameters
[in,out]argsCommand line arguments to update.

◆ loadArgs()

bool ts::InfluxArgs::loadArgs ( Args & args,
bool required )

Load arguments from command line. Apply defaults from environment variables and Influx configurations file. Args error indicator is set in case of incorrect arguments.

Parameters
[in,out]argsCommand line arguments.
[in]requiredIf true, all arguments to connect to InfluuxDB are required. When false, the arguments are optional.
Returns
True on success, false on error in argument line.

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