{"chashed", false, "", "Consistent hashed ('sticky') distribution over available servers, also based on the server 'weight' parameter"},
{"wrandom", false, "", "Weighted random over available servers, based on the server 'weight' parameter"},
{"setServerID", true, "name", "Set the internal Server ID to this value"},
+ {"getServerID", true, "", "Get the internal Server ID as a string"},
};
#if defined(HAVE_LIBEDIT)
*/
#include "bpf-filter.hh"
#include "config.h"
+#include "dnsdist-configuration.hh"
#include "dnsdist.hh"
#include "dnsdist-async.hh"
#include "dnsdist-dynblocks.hh"
newThread.detach();
});
+ luaCtx.writeFunction("getServerID", []() -> std::string {
+ return dnsdist::configuration::getCurrentRuntimeConfiguration().d_server_id;
+ });
+
luaCtx.writeFunction("refreshRuntimeConfiguration", []() {
dnsdist::configuration::refreshLocalRuntimeConfiguration();
});