class NodeHealth
Defined at line 37 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/health.h
Represents the health associated with a given inspect_deprecated::Node.
This class supports adding a Node with name "fuchsia.inspect.Health" that consists of "status" and "message" properties. Nodes implementing fuchsia.inspect.Health can be aggregated in health checking scripts inspecttem-wide.
Functions
NodeHealth
public void NodeHealth(::inspect::Node * parent_node)
Defined at line 16 of file ../../zircon/system/ulib/inspect/health.cc
Constructs a new NodeHealth object that wraps a health designation for the given node.
The initial status is STARTING_UP.
NodeHealth
public void NodeHealth(::inspect::Node * parent_node, const std::function<zx_time_t ()> & clock_fn)
Defined at line 10 of file ../../zircon/system/ulib/inspect/health.cc
Constructs a new NodeHealth object, which uses the passed-in clock to get the needed timestamps. Useful for testing, for example. Does not take ownership of the clock.
Ok
public void Ok()
Defined at line 21 of file ../../zircon/system/ulib/inspect/health.cc
Sets the health of this node to OK, with no message.
StartingUp
public void StartingUp()
Defined at line 26 of file ../../zircon/system/ulib/inspect/health.cc
Sets the health of this node to STARTING_UP, with no message.
StartingUp
public void StartingUp(const std::string & message)
Defined at line 31 of file ../../zircon/system/ulib/inspect/health.cc
Sets the health of this node to STARTING_UP, with the given message.
Unhealthy
public void Unhealthy(const std::string & message)
Defined at line 36 of file ../../zircon/system/ulib/inspect/health.cc
Sets the health of this node to UNHEALTHY, with the given message.
SetStatus
public void SetStatus(const std::string & status, const std::string & message)
Defined at line 41 of file ../../zircon/system/ulib/inspect/health.cc
Explicitly sets the status to the given value with the given message.
NodeHealth
public void NodeHealth(NodeHealth && )
Defined at line 51 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/health.h
Allow moving, disallow copying.
NodeHealth
public void NodeHealth(const NodeHealth & )
Defined at line 52 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/health.h
operator=
public NodeHealth & operator=(NodeHealth && )
Defined at line 53 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/health.h
operator=
public NodeHealth & operator=(const NodeHealth & )
Defined at line 54 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/health.h