Commit c72020f0 authored by Jordan Sissel's avatar Jordan Sissel

- add host and port

- add ssl_ca_path
parent dd7017ee
......@@ -33,9 +33,17 @@ void *emitter(void *arg) {
backoff_init(&sleeper, &MIN_SLEEP, &MAX_SLEEP);
struct lumberjack *lumberjack;
lumberjack = lumberjack_new("localhost", 1234);
lumberjack = lumberjack_new(config->host, config->port);
insist(lumberjack != NULL, "lumberjack_new failed");
if (config->ssl_ca_path != NULL) {
rc = lumberjack_set_ssl_ca(lumberjack, config->ssl_ca_path);
if (rc != 0) {
printf("lumberjack_set_ssl_ca failed. Is '%s' valid?\n", config->ssl_ca_path);
return NULL;
}
}
long count = 0;
for (;;) {
/* Receive an event from a harvester and put it in the queue */
......
......@@ -5,6 +5,9 @@ struct emitter_config {
void *zmq; /* zmq context */
char *zmq_endpoint; /* inproc://whatever */
char *ssl_ca_path; /* path to trusted ssl ca, can be a directory or a file */
char *host;
short port;
};
void *emitter(void *arg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment