Wren is the API layer between external client libraries, and Compute. It also manages table schema and metadata.
- To manage dependences, wren uses go-modules.
- The
go.mod
file is defined in the root wren folder.
- The
- To generate gRPC/protobuf libraries, wren uses Buf
- The
buf.gen.yaml
files are defined in the root proto folder
- The
Note that building wren currently requires docker. Docker is used for generating code for gRPC
via buf
.
make proto/generate
- writes the output to
gen/
-- all the files execpt those that match the pattern*.ent.go
are dyamically generated. do not commit them to the repo.
- writes the output to
make ent/generate
- writes the output to
ent/
-- all the files except those inent/schema/
andent/generate.go
are dyamically generated. do not commit them to the repo.
- writes the output to
make wren/build
- generates the wren executable
To add mocks for additional interfaces in wren, update the .mockery.yaml
file and then run make wren/generate-mocks
from the root folder of the monorepo.
To update the existing mocks for recent interface changes, run make wren/generate-mocks
from the from the root folder of the monorepo.
From the root of the monorepo, run make wren/test
The following standards are used in the design of the Wren API:
- For gRPC/protobuf:
- For REST:
- For protobuf linting / compiling / documentation: buf
- For the REST reverse-proxy & documentation: grpc-gateway
- For gRPC/protobuf documentation, one of the following (to be decided):
-
gRPC Website - Official documentation, libraries, resources, samples and FAQ
-
gRPC Technical documentation - Collection of useful technical documentation
-
gRPC status codes - Status codes and their use in gRPC
-
gRPC status code mapping - HTTP to gRPC Status Code Mapping
-
grpc-errors - Code examples in each language on how to return and handle error statuses. *Zerolog