- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
PrefixAllocator::PrefixAllocator(
const std::string& myNodeName,
const KvStoreLocalCmdUrl& kvStoreLocalCmdUrl,
const KvStoreLocalPubUrl& kvStoreLocalPubUrl,
const PrefixManagerLocalCmdUrl& prefixManagerLocalCmdUrl,
const MonitorSubmitUrl& monitorSubmitUrl,
const AllocPrefixMarker& allocPrefixMarker,
const folly::Optional<folly::CIDRNetwork> seedPrefix,
uint32_t allocPrefixLen,
bool setLoopbackAddress,
bool overrideGlobalAddress,
const std::string& loopbackIfaceName,
std::chrono::milliseconds syncInterval,
PersistentStoreUrl const& configStoreUrl,
fbzmq::Context& zmqContext)
: myNodeName_(myNodeName),
allocPrefixMarker_(allocPrefixMarker),
seedPrefix_(seedPrefix),
allocPrefixLen_(allocPrefixLen),
setLoopbackAddress_(setLoopbackAddress),
overrideGlobalAddress_(overrideGlobalAddress),
loopbackIfaceName_(loopbackIfaceName),
syncInterval_(syncInterval),
configStoreClient_(configStoreUrl, zmqContext),
zmqMonitorClient_(zmqContext, monitorSubmitUrl) {
Фейсбук выложил какую-то хуйню https://github.com/facebook/openr/blob/master/openr/allocators/PrefixAllocator.cpp#L61