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

Method authenticate

src/zookeeper/group.cpp:389–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387
388
389Try<bool> GroupProcess::authenticate()
390{
391 CHECK_EQ(state, CONNECTED);
392
393 // Authenticate if necessary.
394 if (auth.isSome()) {
395 LOG(INFO) << "Authenticating with ZooKeeper using " << auth->scheme;
396
397 int code = zk->authenticate(auth->scheme, auth->credentials);
398
399 if (code == ZINVALIDSTATE || (code != ZOK && zk->retryable(code))) {
400 return false;
401 } else if (code != ZOK) {
402 return Error(
403 "Failed to authenticate with ZooKeeper: " + zk->message(code));
404 }
405 }
406
407 state = AUTHENTICATED;
408 return true;
409}
410
411
412Try<bool> GroupProcess::create()

Callers

nothing calls this directly

Calls 4

retryableMethod · 0.80
ErrorFunction · 0.50
isSomeMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected