Fixes#550.
This will make it possible to configure the advertised adresses for
SerfLan, SerfWan and RPC. It will enable multiple consul clients on a
single host which is very useful in a container environment.
This option might override advertise_addr and advertise_addr_wan
depending on the configuration.
It will be configureable with advertise_addrs. Example:
{
"advertise_addrs": {
"serf_lan": "10.0.120.91:4424",
"serf_wan": "201.20.10.61:4423",
"rpc": "10.20.10.61:4424"
}
}
Client works for RPC; will honor CONSUL_RPC_ADDR. HTTP works via consul/api;
honors CONSUL_HTTP_ADDR.
The format of a Unix socket in configuration data is:
"unix://[/path/to/socket];[username or uid];[gid];[mode]"
Obviously, the user must have appropriate permissions to create the socket
file in the given path and assign the requested uid/gid. Also note that Go does
not support gid lookups from group name, so gid must be numeric. See
https://codereview.appspot.com/101310044
When connecting from the client, the format is just the first part of the
above line:
"unix://[/path/to/socket]"
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
Add an config object that allows adding HTTP header response fields to every
HTTP API response.
Each specified header is added to every response from all HTTP API endpoints.
Each individual endpoint may overwrite the specified header, which makes sure
that Consul headers such as 'X-Consul-Index' is enforced by the API.
This change-set adds another key to the configuration decoding called
`services`, which is expected to be a list of service definitions. It
follows the established convention of only allowing one of the keys:
`service`, `check`, `services`. For every entry in the list it calls
the corresponding decode method and appends it to the Servics of the
resulting Config.
While a similar result could be achieved with changing the Services
member of the Config struct to have named mapstruct tag it lacks the
proper time conversions provided by DecodeServiceDefinition.