Skip to content

Latest commit

 

History

History
89 lines (68 loc) · 1.98 KB

CODE_STRUCTURE.md

File metadata and controls

89 lines (68 loc) · 1.98 KB

Code Structure

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

Table of Contents

api/

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.

  1. Using local dependencies

    # install the dependencies locally
    make pbs-install-deps
    
    # generate the protobuf code
    make pbs
  2. Using Docker

    make pbs-docker-image

cmd/

The cmd directory is the entrypoint code for the PBnJ server and client.

pkg/

The pkg directory contains generic utility type Go packages for PBnJ.

scripts/

The scripts directory contains helper scripts for things like protocol buffer code generation, container image running, and running the server locally.

grpc/

The grpc directory contains the gRPC server implementations of PBnJ.

test/

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.