passport: Add project skeleton

Add basic service skeleton which sets up an empty gRPC service on a
specified port.

BUG=b:375020169
TEST=build.sh && ./go/bin/passport -p=9300 -log-level=DEBUG
TEST=build.sh && ./go/bin/passport -p=9300 -log-level=DEBUG -mode=TEST

Change-Id: I8be5163fed4f0c19e24963977107b505a1bdd7fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/passport/+/5963156
Commit-Queue: Jason Stanko <jstanko@google.com>
Reviewed-by: Brett Brotherton <bbrotherton@google.com>
Tested-by: Jason Stanko <jstanko@google.com>
10 files changed
tree: 8df2f7df4b20e8e33d8b8fc0b81d279e6bf6f570
  1. go/
  2. scripts/
  3. .gitignore
  4. DIR_METADATA
  5. LICENSE
  6. OWNERS
  7. PRESUBMIT.cfg
  8. README.md
README.md

passport

A service for controlling components in ChromeOS peripheral testbeds.

See go/cros-pass-port

Building

Without Docker

Local Machine

The executable can be built on your local machine by running ./scripts/build.sh

Testing

When not using docker, the service can be started in server mode by running:

./go/bin/passport

Once a service is running, it can be verified in a separate terminal by running:

./go/bin/passport -mode DETECT

This will probe for all components connected to the machine and log them to STDOUT. This can also be used to check an already running service on a remote machine.

It's also possible to quickly test the executable without starting two separate processes by running:

./go/bin/passport -mode TEST

This will perform the same actions as DETECT except both the client and server will be started in the same process without needing a separate terminal window.