x/ref/services/device/deviced/internal/impl: changes for new socket-based agent

Add support to device manager to work with the new unix doman sockets agent
scheme.

The implementation creates a socket file each time we need to use the app's
principal (using ServePrincipal) and then deletes the socket file (using
StopServing) when no longer needed.  Besides freeing resources in the agent,
this strategy ensures that if the agent goes down and comes back up, we don't
attempt to use a stale socket file (the agent does not yet have support for
re-creating sockets when it restarts). This makes the implementation a bit more
complex since we have to track when the app is not running and stop serving the
socket.

Change-Id: Idd0f94a5f80bf35201758e8b2c43533c738c0ea2
2 files changed
tree: 1a020c9ab48286cb6ab9b83b59af1890ebd97467
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTORS
  11. envvar.go
  12. envvar_test.go
  13. LICENSE
  14. PATENTS
  15. README.md
  16. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.