inspect:: ComponentInspector
#include <component.h>
ComponentInspector is an instance of an Inspector that serves its Inspect data via the fuchsia.inspect.Tree protocol.
Summary
Example:
``` #include
int main() { using inspect::ComponentInspector;
async::Loop loop(&kAsyncLoopConfigAttachToCurrentThread); auto* dispatcher = loop.dispatcher(); auto inspector = ComponentInspector(dispatcher, {});
inspector.root().RecordInt("val1", 1);
inspector.Health().Ok();
loop.Run(); return 0; } ```
Constructors and Destructors |
|
---|---|
ComponentInspector(component::OutgoingDirectory & outgoing_directory, async_dispatcher_t *dispatcher, Inspector inspector, TreeHandlerSettings settings)
Construct a ComponentInspector and host it on the given outgoing directory.
|
|
ComponentInspector(ComponentInspector &&)
|
Public functions |
|
---|---|
Health()
|
Gets the NodeHealth for this component.
|
inspector() const
|
const Inspector &
Get the wrapped Inspector.
|
inspector()
|
|
operator=(ComponentInspector &&)=default
|
|
root()
|
Node &
Get the Inspector's root node.
|
Public functions
ComponentInspector
ComponentInspector( component::OutgoingDirectory & outgoing_directory, async_dispatcher_t *dispatcher, Inspector inspector, TreeHandlerSettings settings )
Construct a ComponentInspector and host it on the given outgoing directory.
Note that it is the caller's responsibility to ensure the outgoing directory is served.
ComponentInspector
ComponentInspector( ComponentInspector && )=default
Health
NodeHealth & Health()
Gets the NodeHealth for this component.
This method is not thread safe.
inspector
Inspector & inspector()
operator=
ComponentInspector & operator=( ComponentInspector && )=default