File network.cpp

namespace faabric
namespace util

Functions

std::string getIPFromHostname(const std::string &hostname)
std::string getPrimaryIPForThisHost(const std::string &interface)

Returns the IP for the given interface, or picks one based on an “appropriate” interface name.

Variables

static std::unordered_map<std::string, std::string> ipMap
static std::mutex hostnameMx