{"addLocal", true, R"(addr [, {doTCP=true, reusePort=false, tcpFastOpenQueueSize=0, interface="", cpus={}}])", "add `addr` to the list of addresses we listen on"},
{"addMaintenanceCallback", true, "callback", "register a function to be called as part of the maintenance hook, every second"},
{"addExitCallback", true, "callback", "register a function to be called when DNSdist exits"},
+ {"addServerStateChangeCallback", true, "callback", "register a function to be called when state changed for a given server"},
{"addTLSLocal", true, "addr, certFile(s), keyFile(s) [,params]", "listen to incoming DNS over TLS queries on the specified address using the specified certificate (or list of) and key (or list of). The last parameter is a table"},
{"AllowAction", true, "", "let these packets go through"},
{"AllowResponseAction", true, "", "let these packets go through"},
Register a Lua function to be called when a server state changed during the health check process.
The function should not block for a long period of time, as it would otherwise delay the execution of the other functions registered for this hook, as well as the execution of the health check process.
- :param function callback: The function to be called. It returns no value and takes two parameters, first parameter is a string with format as the same as return from :func:`Server:getNameWithAddr()` to identify the server, second parameter is a bool value indicating server state is up if true else down.
+ :param function callback: The function to be called. It returns no value and takes two parameters: the first parameter is a string identifying the server, formatted as if returned by :func:`Server:getNameWithAddr()`, the second parameter is a boolean value indicating whether the server is up.