| 644 | } |
| 645 | |
| 646 | void ClusterEvents::ForceNextCheckChangedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr& origin) |
| 647 | { |
| 648 | ApiListener::Ptr listener = ApiListener::GetInstance(); |
| 649 | |
| 650 | if (!listener) |
| 651 | return; |
| 652 | |
| 653 | Host::Ptr host; |
| 654 | Service::Ptr service; |
| 655 | tie(host, service) = GetHostService(checkable); |
| 656 | |
| 657 | Dictionary::Ptr params = new Dictionary(); |
| 658 | params->Set("host", host->GetName()); |
| 659 | if (service) |
| 660 | params->Set("service", service->GetShortName()); |
| 661 | params->Set("forced", checkable->GetForceNextCheck()); |
| 662 | |
| 663 | Dictionary::Ptr message = new Dictionary(); |
| 664 | message->Set("jsonrpc", "2.0"); |
| 665 | message->Set("method", "event::SetForceNextCheck"); |
| 666 | message->Set("params", params); |
| 667 | |
| 668 | listener->RelayMessage(origin, checkable, message, true); |
| 669 | } |
| 670 | |
| 671 | Value ClusterEvents::ForceNextCheckChangedAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params) |
| 672 | { |
nothing calls this directly
no test coverage detected