veyron/services/mgmt/node/impl: consolidate the callback logic in one place,
exposing a narrower API to the rest of the node manager so invokers can listen
for values from children without being exposed to the internals.

The API is in the form of a listener interface, that hides the details of
callback IDs, channels, etc.

Tangentially related to the above, I added logic to the unit test to check that
callback channels get cleaned up properly. Did this using a generic 'Leaking'
method that's only compiled for tests and does not expose the implementation of
the rest of the node manager (we can add more verification items to Leaking
later on). Also changed the tests to stop the node manager before the conclusion
of each test (Cleanup kills the child rather than shutting it down cleanly). To
achieve clean shutdown, I went the route of exposing the child's PID via stdout
and then sending it a catchable signal.

Change-Id: I39b782261807306965ea65bed9b438eaea0de484
7 files changed
tree: 05b6ce6621b38d2938cfa8290be104982a0c17a3
  1. examples/
  2. lib/
  3. profiles/
  4. runtimes/
  5. security/
  6. services/
  7. tools/