diff --git a/src/resty/dns/balancer/base.lua b/src/resty/dns/balancer/base.lua index 1e8ea30..1af784b 100644 --- a/src/resty/dns/balancer/base.lua +++ b/src/resty/dns/balancer/base.lua @@ -1275,11 +1275,18 @@ end -- -- Signature of the callback is for address adding/removing: -- --- `function(balancer, "added"/"removed", address, ip, port, hostname)` --- --- where `ip` might also --- be a hostname if the DNS resolution returns another name (usually in --- SRV records). +-- `function(balancer, "added"/"removed", address, ip, port, hostname, hostheader)` +-- +-- - `address` is the address object added +-- - `ip` is the IP address for this object, but might also be a hostname if +-- the DNS resolution returns another name (usually in SRV records) +-- - `port` is the port to use +-- - `hostname` is the hostname for which the address was added to the balancer +-- with `addHost` (resolving that name caused the creation of this address) +-- - `hostheader` is the hostheader to be used. This can have 3 values; 1) `nil` if the +-- `hostname` added was an ip-address to begin with, 2) it will be equal to the +-- name in `ip` if there is a named SRV entry, and `useSRVname == true`, 3) otherwise +-- it will be equal to `hostname` -- -- For health updates the signature is: --