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;

}

```

Public Methods

void ComponentInspector (async_dispatcher_t * dispatcher, PublishOptions opts)

Construct a `ComponentInspector` with the provided `PublishOptions`.

This `ComponentInspector` will be published via `fuchsia.inspect.InspectSink`.

Defined at line 11 of file ../../sdk/lib/inspect/component/cpp/component.cc

NodeHealth & Health ()

Gets the NodeHealth for this component.

This method is not thread safe.

Defined at line 39 of file ../../sdk/lib/inspect/component/cpp/component.cc

void ComponentInspector (ComponentInspector && )

Defined at line 90 of file ../../sdk/lib/inspect/component/cpp/component.h

ComponentInspector & operator= (ComponentInspector && )

Defined at line 91 of file ../../sdk/lib/inspect/component/cpp/component.h

Node & root ()

Get the Inspector's root node.

Defined at line 94 of file ../../sdk/lib/inspect/component/cpp/component.h

const Inspector & inspector ()

Get the wrapped Inspector.

Defined at line 97 of file ../../sdk/lib/inspect/component/cpp/component.h

Inspector & inspector ()

Defined at line 98 of file ../../sdk/lib/inspect/component/cpp/component.h