This commit adds a new per event_exporter { } block setting to specify the
transport timeout. For example:
event_exporter {
transport = foo
transport_args = ...
transport_timeout = 123msecs
format = bar
format_args = ...
}
Note that this commit only introduces the setting. The transports will be
changed to make use of it in future commits.
exporter = p_new(metrics->pool, struct exporter, 1);
exporter->name = p_strdup(metrics->pool, set->name);
exporter->transport_args = p_strdup(metrics->pool, set->transport_args);
+ exporter->transport_timeout = set->transport_timeout;
exporter->time_format = set->parsed_time_format;
/* TODO: The following should be plugable.
* the "how do we get the event to the external location" knobs
*/
const char *transport_args;
+ unsigned int transport_timeout;
/* function to send the event */
void (*transport)(const struct exporter *, const buffer_t *);
DEF(SET_STR, name),
DEF(SET_STR, transport),
DEF(SET_STR, transport_args),
+ DEF(SET_TIME_MSECS, transport_timeout),
DEF(SET_STR, format),
DEF(SET_STR, format_args),
SETTING_DEFINE_LIST_END
.name = "",
.transport = "",
.transport_args = "",
+ .transport_timeout = 250, /* ms */
.format = "",
.format_args = "",
};
const char *name;
const char *transport;
const char *transport_args;
+ unsigned int transport_timeout;
const char *format;
const char *format_args;