class ComponentInspector
Defined at line 84 of file ../../sdk/lib/inspect/component/cpp/component.h
ComponentInspector is an instance of an Inspector that serves its Inspect data via the fuchsia.inspect.Tree protocol.
Example:
``` #include <lib/async-loop/cpp/loop.h> #include <lib/async-loop/default.h> #include <lib/inspect/component/cpp/component.h>
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; } ```
Functions
ComponentInspector
public void ComponentInspector(async_dispatcher_t * dispatcher,
PublishOptions
opts)
Defined at line 11 of file ../../sdk/lib/inspect/component/cpp/component.cc
Construct a `ComponentInspector` with the provided `PublishOptions`. This `ComponentInspector` will be published via `fuchsia.inspect.InspectSink`.
Health
public NodeHealth & Health()
Defined at line 39 of file ../../sdk/lib/inspect/component/cpp/component.cc
Gets the NodeHealth for this component. This method is not thread safe.
ComponentInspector
public void ComponentInspector(ComponentInspector && )
Defined at line 90 of file ../../sdk/lib/inspect/component/cpp/component.h
operator=
public ComponentInspector & operator=(ComponentInspector && )
Defined at line 91 of file ../../sdk/lib/inspect/component/cpp/component.h
root
public Node & root()
Defined at line 94 of file ../../sdk/lib/inspect/component/cpp/component.h
Get the Inspector's root node.
inspector
public const Inspector & inspector()
Defined at line 97 of file ../../sdk/lib/inspect/component/cpp/component.h
Get the wrapped Inspector.
inspector
public Inspector & inspector()
Defined at line 98 of file ../../sdk/lib/inspect/component/cpp/component.h