Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
help: input: Correct listen should be a parameter for setting up list…
…en address Before this commit, fluent-bit -J produces the incorrect schema for listen address for ip. host should be used for specifing to hostname. And, listen parameter should be used for setting up for listen address. This is because the following lines in flb_input.c: ```c else if (prop_key_check("listen", k, len) == 0) { flb_utils_set_plugin_string_property("listen", &ins->host.listen, tmp); } else if (prop_key_check("host", k, len) == 0) { flb_utils_set_plugin_string_property("host", &ins->host.name, tmp); } ``` Set up for listen address and hostname respectively. And the host member is typed as struct flb_net_host whose definition is: ```c struct flb_input_instance { /* snip */ /* * Input network info: * * An input plugin can be specified just using it shortname or using the * complete network address format, e.g: * * $ fluent-bit -i cpu -o plugin://hostname:port/uri * * where: * * plugin = the output plugin shortname * name = IP address or hostname of the target * port = target TCP port * uri = extra information that may be used by the plugin */ struct flb_net_host host; /* snip */ }; ``` Then, the type of struct flb_net_host should be: ```c /* Defines a host service and it properties */ struct flb_net_host { int ipv6; /* IPv6 required ? */ flb_sds_t address; /* Original address */ int port; /* TCP port */ flb_sds_t name; /* Hostname */ flb_sds_t listen; /* Listen interface */ struct flb_uri *uri; /* Extra URI parameters */ }; ``` So, the usage and generating for host and listen parameters are inverted and I have to add a host config_map for DNS resolutions. Signed-off-by: Hiroshi Hatake <[email protected]>
- Loading branch information