| 680 | |
| 681 | |
| 682 | void Framework::heartbeat() |
| 683 | { |
| 684 | CHECK_SOME(http_); |
| 685 | |
| 686 | // TODO(vinod): Make heartbeat interval configurable and include |
| 687 | // this information in the SUBSCRIBED response. |
| 688 | scheduler::Event event; |
| 689 | event.set_type(scheduler::Event::HEARTBEAT); |
| 690 | |
| 691 | heartbeater.reset( |
| 692 | new ResponseHeartbeater<scheduler::Event, v1::scheduler::Event>( |
| 693 | "framework " + stringify(info.id()), |
| 694 | event, |
| 695 | http_.get(), |
| 696 | DEFAULT_HEARTBEAT_INTERVAL, |
| 697 | None(), |
| 698 | [this, event]() { |
| 699 | this->metrics.incrementEvent(event); |
| 700 | })); |
| 701 | } |
| 702 | |
| 703 | |
| 704 | bool Framework::isTrackedUnderRole(const std::string& role) const |
no test coverage detected