5#include "boost/json/src.hpp"
11#define ADC_PUBLISHER_NONE_NAME "none"
14#define ADC_PUBLISHER_STDOUT_NAME "stdout"
17#define ADC_PUBLISHER_SYSLOG_NAME "syslog"
20#define ADC_PUBLISHER_FILE_NAME "file"
23#define ADC_PUBLISHER_MULTIFILE_NAME "multifile"
26#define ADC_PUBLISHER_CURL_NAME "curl"
29#define ADC_PUBLISHER_LDMS_SUBPROCESS_NAME "ldmsd_stream_publish"
32#define ADC_PUBLISHER_LDMS_SUBPROCESS_MESSAGE_NAME "ldms_message_publish"
35#define ADC_PUBLISHER_SCRIPT_NAME "script"
40#ifdef ENABLE_ADC_PUBLISHER_LIBLDMS_MSG
41#define ADC_PUBLISHER_LIBLDMS_MSG_NAME "libldms_msg"
47#ifdef ENABLE_ADC_PUBLISHER_LIBCURL
48#define ADC_PUBLISHER_LIBCURL_NAME "libcurl"
54#define ADC_PUBLISHER_LIBADIAK_NAME "libadiak_many"
57#if defined(ADIAK_HAVE_JSONSTRING) && (ADIAK_HAVE_JSONSTRING==1)
58#define ADC_PUBLISHER_LIBADIAK_JSON_NAME "libadiak_json"
72 if (names.size() == 0 ) {
83#ifdef ENABLE_ADC_PUBLISHER_LIBCURL
84 names.insert( ADC_PUBLISHER_LIBCURL_NAME );
87#ifdef ENABLE_ADC_PUBLISHER_LIBLDMS_MSG
88#define ADC_PUBLISHER_LIBLDMS_MSG_NAME "libldms_msg"
89 names.insert( ADC_PUBLISHER_LIBLDMS_MSG_NAME );
92#ifdef ENABLE_ADC_PUBLISHER_LIBADIAK
93 names.insert( ADC_PUBLISHER_LIBADIAK_NAME );
96#ifdef ADC_PUBLISHER_LIBADIAK_JSON_NAME
97 names.insert( ADC_PUBLISHER_LIBADIAK_JSON_NAME );
113 const std::map< std::string, std::string > m;
114 if (namelist.size() != 0) {
115 for (
auto n : namelist) {
118 int ec = p->config(m);
125 const char *env = getenv(
"ADC_MULTI_PUBLISHER_NAMES");
128 for (
auto n : enames) {
131 int ec = p->config(m);
145 auto it = names.find(name);
146 if (it != names.end()) {
183#ifdef ENABLE_ADC_PUBLISHER_LDMS_STREAM
186#ifdef ENABLE_ADC_PUBLISHER_LIBCURL
189#ifdef ENABLE_ADC_PUBLISHER_LIBADIAK
190 if (name == ADC_PUBLISHER_LIBADIAK_NAME ) {
191 std::shared_ptr<publisher_api> p(
new libadiak_plugin);
196 return std::shared_ptr<publisher_api>();
199std::shared_ptr<publisher_api>
factory::get_publisher(
const std::string& name,
const std::map<std::string, std::string>& opts)
202 auto it = names.find(name);
203 if (it != names.end()) {
205 std::shared_ptr<publisher_api> p(
new none_plugin());
220 std::shared_ptr<publisher_api> p(
new file_plugin());
230 std::shared_ptr<publisher_api> p(
new curl_plugin());
253 return std::shared_ptr<publisher_api>();
266 std::shared_ptr<builder_api> b(
new builder);
Implementation of builder_api with optional (compile-time) support of MPI. If compiled without MPI,...
Curl utility publisher_api implementation. This plugin generates a scratch file (in-memory) and async...
const std::set< std::string > & get_publisher_names()
std::shared_ptr< publisher_api > get_publisher(const std::string &name)
std::shared_ptr< multi_publisher_api > get_multi_publisher()
std::shared_ptr< builder_api > get_builder()
File output publisher_api implementation. This plugin generates writes each message to the configured...
ldms_message_publish utility publisher_api implementation. This plugin generates a scratch file (in-m...
ldmsd_stream_publish utility publisher_api implementation. This plugin generates a scratch file (in-m...
Parallel file output publisher_api implementation. This plugin generates writes each message to the c...
Message suppression publisher; it quietly ignores all publication requests.
User script publisher plugin. The program specified by environment variable is used to asynchronously...
Terminal output publisher_api implementation. This plugin sends messages to stdout synchronously....
syslog publisher_api implementation. This plugin sends messages to syslog synchronously....
#define ADC_PUBLISHER_SCRIPT_NAME
#define ADC_PUBLISHER_MULTIFILE_NAME
#define ADC_PUBLISHER_NONE_NAME
#define ADC_PUBLISHER_STDOUT_NAME
#define ADC_PUBLISHER_CURL_NAME
#define ADC_PUBLISHER_LDMS_SUBPROCESS_MESSAGE_NAME
#define ADC_PUBLISHER_SYSLOG_NAME
#define ADC_PUBLISHER_LDMS_SUBPROCESS_NAME
#define ADC_PUBLISHER_FILE_NAME
std::vector< std::string > split_string(const std::string &s, char delimiter)