MCPcopy Create free account
hub / github.com/apache/mesos / initialize

Method initialize

src/watcher/whitelist_watcher.cpp:56–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56void WhitelistWatcher::initialize()
57{
58 // If no whitelist file is given (loaded whitelist is in state
59 // (1) absent), then there is no need to watch. In case the
60 // subscriber's initial policy was not permissive (initial
61 // whitelist is not in (1) absent), notify the subscriber that
62 // there is no whitelist any more.
63 //
64 // TODO(cmaloney): In older versions of Mesos the default value for
65 // 'whitelist' which represented "accept all nodes" was the string
66 // value '*' rather than 'None'. For backwards compatibility we
67 // still check for '*'. Can be removed after 0.23.
68 if (path.isSome() && path->string() == "*") {
69 LOG(WARNING)
70 << "Explicitly specifying '*' for the whitelist in order to "
71 << "\"accept all\" is deprecated and will be removed in a future "
72 << "release; simply don't specify the whitelist flag in order to "
73 << "\"accept all\" agents";
74 }
75
76 if (path.isNone() || path->string() == "*") { // Accept all nodes.
77 VLOG(1) << "No whitelist given";
78 if (lastWhitelist.isSome()) {
79 subscriber(None());
80 }
81 } else {
82 watch();
83 }
84}
85
86
87void WhitelistWatcher::watch()

Callers 1

jquery.pailer.jsFile · 0.45

Calls 4

NoneClass · 0.85
isSomeMethod · 0.45
stringMethod · 0.45
isNoneMethod · 0.45

Tested by

no test coverage detected