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

Method received

src/cli/execute.cpp:646–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644 }
645
646 void received(queue<Event> events)
647 {
648 while (!events.empty()) {
649 Event event = events.front();
650 events.pop();
651
652 switch (event.type()) {
653 case Event::SUBSCRIBED: {
654 frameworkInfo.mutable_id()->
655 CopyFrom(event.subscribed().framework_id());
656
657 state = SUBSCRIBED;
658
659 cout << "Subscribed with ID " << frameworkInfo.id() << endl;
660 break;
661 }
662
663 case Event::OFFERS: {
664 offers(google::protobuf::convert(event.offers().offers()));
665 break;
666 }
667
668 case Event::UPDATE: {
669 update(event.update().status());
670 break;
671 }
672
673 case Event::ERROR: {
674 EXIT(EXIT_FAILURE)
675 << "Received an ERROR event: " << event.error().message();
676
677 break;
678 }
679
680 case Event::HEARTBEAT:
681 case Event::INVERSE_OFFERS:
682 case Event::FAILURE:
683 case Event::RESCIND:
684 case Event::RESCIND_INVERSE_OFFER:
685 case Event::UPDATE_OPERATION_STATUS:
686 case Event::MESSAGE: {
687 break;
688 }
689
690 case Event::UNKNOWN: {
691 LOG(WARNING) << "Received an UNKNOWN event and ignored";
692 break;
693 }
694 }
695 }
696 }
697
698 void update(const TaskStatus& status)
699 {

Callers

nothing calls this directly

Calls 12

typeMethod · 0.80
CopyFromMethod · 0.80
subscribedMethod · 0.80
errorMethod · 0.65
convertFunction · 0.50
updateFunction · 0.50
emptyMethod · 0.45
idMethod · 0.45
offersMethod · 0.45
statusMethod · 0.45
updateMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected