|
libadc-cxx 1.0.0
Structured logging for scientific computing
|
libldms_msg_publish publisher_api implementation. This plugin calls the ldms libraries for sending messages. More...


Public Member Functions | |
| libldms_msg_publish_plugin () | |
| int | publish (std::shared_ptr< builder_api > b) |
| Publish the content of the builder. | |
| int | config (const std::map< std::string, std::string > &m) |
| Configure the plugin with the options given. | |
| int | config (const std::map< std::string, std::string > &m, const std::string &env_prefix) |
| const std::map< const std::string, const std::string > & | get_option_defaults () |
| Look up the settable options and their defaults. | |
| int | initialize () |
| Ready the plugin to publish following the configuration options set or defaulted. | |
| void | finalize () |
| Stop publishing and release any resources held for managing publication. | |
| void | pause () |
| Pause publishing until a call to resume. Duplicate calls are allowed. | |
| void | resume () |
| Resume publishing Duplicate calls are allowed. | |
| string_view | name () const |
| string_view | version () const |
| ~libldms_msg_publish_plugin () | |
| virtual int | config (const std::map< std::string, std::string > &m, std::string_view env_prefix)=0 |
| Configure the plugin with the options given and the corresponding environment variables. | |
Static Public Attributes | |
| static const char * | adc_libldms_msg_publish_plugin_channel_default = "adc_publish_api" |
| name of the channel ADC messages go into LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_CHANNEL"). | |
| static const char * | adc_libldms_msg_publish_plugin_auth_default = "munge" |
| authentication method for channel connections; ldmsd listeners must match. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_AUTH"). | |
| static const char * | adc_libldms_msg_publish_plugin_port_default = "412" |
| port for channel connections; ldmsd listeners must match. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_PORT"). | |
| static const char * | adc_libldms_msg_publish_plugin_host_default = "localhost" |
| host for channel connections; ldmsd must be listening on the host. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_HOST"). | |
libldms_msg_publish publisher_api implementation. This plugin calls the ldms libraries for sending messages.
Multiple independent instances of this plugin may be used simultaneously. The asynchronous tranmission spawns (or recycles) a separate thread to handle tranmission.
Definition at line 25 of file libldms_msg.ipp.
|
inline |
Definition at line 129 of file libldms_msg.ipp.
|
inline |
Definition at line 204 of file libldms_msg.ipp.
|
inlinevirtual |
Publish the content of the builder.
| b | converted to a single json object and published |
Implements adc::publisher_api.
Definition at line 133 of file libldms_msg.ipp.
|
inlinevirtual |
Configure the plugin with the options given.
| m | a map with keys documented in the plugin-specific header. |
For plugin QQQ, Environment variables ADC_QQQ_PLUGIN_* will override the source code default for any key not defined in m. Here QQQ is the uppercase version of the plugin name.
Implements adc::publisher_api.
Definition at line 144 of file libldms_msg.ipp.
|
inline |
Definition at line 148 of file libldms_msg.ipp.
|
inlinevirtual |
Look up the settable options and their defaults.
Some plugins without options will return an empty map.
Implements adc::publisher_api.
Definition at line 156 of file libldms_msg.ipp.
|
inlinevirtual |
Ready the plugin to publish following the configuration options set or defaulted.
Implements adc::publisher_api.
Definition at line 160 of file libldms_msg.ipp.
|
inlinevirtual |
Stop publishing and release any resources held for managing publication.
Implements adc::publisher_api.
Definition at line 178 of file libldms_msg.ipp.
|
inlinevirtual |
Pause publishing until a call to resume. Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 188 of file libldms_msg.ipp.
|
inlinevirtual |
Resume publishing Duplicate calls are allowed.
Implements adc::publisher_api.
Definition at line 192 of file libldms_msg.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 196 of file libldms_msg.ipp.
|
inlinevirtual |
Implements adc::publisher_api.
Definition at line 200 of file libldms_msg.ipp.
|
pure virtualinherited |
Configure the plugin with the options given and the corresponding environment variables.
| m | a map with keys documented in the plugin-specific header. |
| env_prefix | is prepended to the expected keys for the plugin and values found with getenv that match are used, overriding elements of m. Typically, env_prefix will be PPP_ADC_QQQ_PLUGIN_ if application PPP wants to override the defaults of plugin QQQ. Here QQQ is the uppercase version of the plugin name. |
Implemented in adc::none_plugin, adc::stdout_plugin, adc::libadiak_json_plugin, adc::libadiak_many_plugin, adc::libcurl_plugin, adc::multifile_plugin, adc::script_plugin, adc::syslog_plugin, adc::curl_plugin, adc::file_plugin, adc::ldms_message_publish_plugin, and adc::ldmsd_stream_publish_plugin.
|
inlinestatic |
name of the channel ADC messages go into LDMS aggregators must be subscribed to this name. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_CHANNEL").
Definition at line 40 of file libldms_msg.ipp.
|
inlinestatic |
authentication method for channel connections; ldmsd listeners must match. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_AUTH").
Definition at line 44 of file libldms_msg.ipp.
|
inlinestatic |
port for channel connections; ldmsd listeners must match. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_PORT").
Definition at line 48 of file libldms_msg.ipp.
|
inlinestatic |
host for channel connections; ldmsd must be listening on the host. Overridden with env("ADC_LIBLDMS_MSG_PUBLISH_PLUGIN_HOST").
Definition at line 52 of file libldms_msg.ipp.