Step 9: Proto definitions and gRPC code generation.

Define GardenSync service with 5 RPCs: PushManifest, PushBlobs,
PullManifest, PullBlobs, Prune. Messages for manifest, entries,
blob chunks (64 KiB streaming), and push/pull protocol flow.

Generated Go code in sgardpb/. Added Makefile proto target, gRPC +
protobuf + x/crypto deps, protoc tools to flake devShell.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 23:12:10 -07:00
parent b1313c1048
commit 0113703908
9 changed files with 1373 additions and 7 deletions

20
Makefile Normal file
View File

@@ -0,0 +1,20 @@
.PHONY: proto build test lint clean
proto:
protoc \
--go_out=. --go_opt=module=github.com/kisom/sgard \
--go-grpc_out=. --go-grpc_opt=module=github.com/kisom/sgard \
-I proto \
proto/sgard/v1/sgard.proto
build:
go build ./...
test:
go test ./...
lint:
golangci-lint run ./...
clean:
rm -f sgard