out_nats: add support for IPv6
int cb_nats_init(struct flb_output_instance *ins, struct flb_config *config,
void *data)
{
+ int io_flags;
struct flb_upstream *upstream;
struct flb_out_nats_config *ctx;
@@ -49,6 +50,11 @@ int cb_nats_init(struct flb_output_instance *ins, struct flb_config *config,
return -1;
}
+ io_flags = FLB_IO_TCP;
+ if (ins->host.ipv6 == FLB_TRUE) {
+ io_flags |= FLB_IO_IPV6;
+ }
+
/* Prepare an upstream handler */
upstream = flb_upstream_create(config,
ins->host.name,
