The goal of this document is to help you understand and navigate the PBnJ code base.
$ tree -d -L 3
.
├── api
│ └── v1
├── client
├── cmd
├── docs
├── examples
│ └── clients
│ └── ruby
├── grpc
│ ├── oob
│ │ ├── bmc
│ │ └── machine
│ ├── persistence
│ ├── rpc
│ └── taskrunner
├── pkg
│ ├── healthcheck
│ ├── http
│ ├── logging
│ ├── metrics
│ ├── oob
│ ├── repository
│ ├── task
│ └── zaplog
├── scripts
└── test
└── runner
The api directory holds versioned directories of protocol buffer files (.proto) and generated code. The code generated from the protocol buffers can be produced in 2 ways.
-
Using local dependencies
# install the dependencies locally make pbs-install-deps # generate the protobuf code make pbs
-
Using Docker
make pbs-docker-image
The cmd directory is the entrypoint code for the PBnJ server and client.
The pkg directory contains generic utility type Go packages for PBnJ.
The scripts directory contains helper scripts for things like protocol buffer code generation, container image running, and running the server locally.
The grpc directory contains the gRPC server implementations of PBnJ.
The test directory contains code for running function/integration tests against live hardware. Automating this type of testing is difficult so running this code requires special attention. See the README for details.