commit | 7ebba4edb54130cc8cc10064535e62195586cc6c | [log] [tgz] |
---|---|---|
author | Jared Bennett <jaredbennett@google.com> | Thu Apr 25 23:34:55 2024 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Apr 30 00:57:24 2024 |
tree | 3a6cdf0a25c9c76e0cba5ede5f8f6625b91a1c76 | |
parent | dd3e268ff42062c5145f9bf9ec9044e7bd4969de [diff] |
btpeerd: Add gRPC service scaffold Creates a basic implementation of the BtpeerManagementService served with gRPC with all methods stubbed. This defines the process for starting the btpeerd process and how it starts a gRPC server listening on a specific port. BUG=b:331246657 TEST=scripts/build.sh TEST=btpeerd runs and stops locally as expected TEST=manually tested all CLI flags Change-Id: Ie547432e4728bc3a1a89108ce5ab477e92e16963 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/btpeerd/+/5492526 Tested-by: Jared Bennett <jaredbennett@google.com> Commit-Queue: Jared Bennett <jaredbennett@google.com> Reviewed-by: Jason Stanko <jstanko@google.com>
A system service for controlling Raspberry Pi btpeers for ChromeOS bluetooth testing.
Design: go/btpeerd
System must have golang installed (any version) in order to download and configure the local golang version used by the btpeerd build process.
Build btpeerd on the same system environment the executable is meant to be run on (e.g. in the pi-gen chroot) to ensure system compatibility. The unit tests should not be system dependent, so running the build script on gLinux should be sufficient to say those test pass.
Run scripts/build.sh
to build btpeerd. This will do the following:
./go/bin
./go/bin/btpeerd
No files in this repository are used during btpeerd runtime, the ./go/bin/btpeerd
executable should be runnable directly to launch btpeerd.
Note: Golang is only used during the compilation of the btpeerd
executable.
The btpeerd
accepts the following optional command line options:
--ListenPort=<port>
(default 8100
) Sets the port the gRPC server will listen on.--LogLevel=<DEBUG|INFO|WARN|ERROR>
(default INFO
) Sets the log level of btpeerd.The btpeerd
process will run continuously until a SIGINT
signal (Ctrl+C) is received, upon which it will gracefully shut down the gRPC server and then close.