|
|
||
|---|---|---|
| birdwhisperer | ||
| db | ||
| node | ||
| .gitignore | ||
| README.md | ||
| go.mod | ||
| main.go | ||
README.md
Roost
Where the birds come home to sleep.
Data ingest server, providing an endpoint for nodes to send data for archival.
Go Details
Currently 1.25.3, will stay updated as quickly as possible. Go is very good with backwards compatibility so breaking changes are unlikely.
Once go is installed, go version should return >= 1.25.3.
Install Dependencies
Go will take care of downloading the actual library dependencies (no need for an npm i equivalent) but we have some tooling dependencies as well.
- sqlc is a code gen library that gives type-safe APIs against a schema at compile time. Very handy
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
Learn Go
Use Go By Example - it is an incredible site and will get up to speed quickly. Go is a very simple language so most of the points are easy to look up.
To run roost:
cd path/to/roostgo run .
To build roost for your current target:
cd path/to/roostgo build . [-o binary-name]- Default binary name is
roost, in the current directory
- Default binary name is
To build for different target:
Go is statically linked (and all the code we use is as well, no additional runtime libraries required), so it is trivial to compile on one architecture and copy the binary over to another.
cd path/to/roostgo tool dist list- Using the relevant pair above (e.g.,
linux/amd64):GOOS=linux GOARCH=amd64 go build -o roost-linux-amd64- The
-onames the output binary, it could bebob
- The