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(async_dispatcher_t *dispatcher, PublishOptions opts)
Construct a
ComponentInspector with the provided PublishOptions . |
|
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( async_dispatcher_t *dispatcher, PublishOptions opts )
Construct a ComponentInspector
with the provided PublishOptions
.
This ComponentInspector
will be published via fuchsia.inspect.InspectSink
.
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