Kea
1.9.9-git
|
Set of callbacks used in zone checks. More...
#include <zone_checker.h>
Public Types | |
typedef std::function< void(const std::string &reason)> | IssueCallback |
Functor type of the callback on some issue (error or warning). More... | |
Public Member Functions | |
ZoneCheckerCallbacks (const IssueCallback &error_callback, const IssueCallback &warn_callback) | |
Constructor. More... | |
void | error (const std::string &reason) const |
Call the callback for a critical error. More... | |
void | warn (const std::string &reason) const |
Call the callback for a non critical issue. More... | |
Set of callbacks used in zone checks.
Objects of this class are expected to be passed to checkZone()
.
Definition at line 21 of file zone_checker.h.
typedef std::function<void(const std::string& reason)> isc::dns::ZoneCheckerCallbacks::IssueCallback |
Functor type of the callback on some issue (error or warning).
Its parameter indicates the reason for the corresponding issue.
Definition at line 26 of file zone_checker.h.
|
inline |
Constructor.
Either or both of the callbacks can be empty, in which case the corresponding callback will be effectively no-operation. This can be used, for example, when the caller of checkZone()
is only interested in the final result. Note that a NULL
pointer will be implicitly converted to an empty functor object, so passing NULL
suffices.
none |
error_callback | Callback functor to be called on critical errors. |
warn_callback | Callback functor to be called on non critical issues. |
Definition at line 42 of file zone_checker.h.
|
inline |
Call the callback for a critical error.
This method itself is exception free, but propagates any exception thrown from the callback.
reason | Textual representation of the reason for the error. |
Definition at line 53 of file zone_checker.h.
|
inline |
Call the callback for a non critical issue.
This method itself is exception free, but propagates any exception thrown from the callback.
reason | Textual representation of the reason for the issue. |
Definition at line 65 of file zone_checker.h.
Referenced by isc::dns::checkZone().