feat: extract kafkamgmt.v1 proto contract from kafaka_management_service

Single source of truth for the wire contract shared by the server,
kmsvc-sdk, and kmsvc-cli. Ships proto source + buf lint/breaking-change
config only; consumers submodule this repo and codegen independently
with their own go_package override (see README.md).
This commit is contained in:
riotpiaole
2026-06-21 19:05:13 -07:00
commit c42a5df536
7 changed files with 279 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# kmsvc-proto
Shared `kafkamgmt.v1` proto contract for the Kafka Management Service ecosystem (`kafaka_management_service`, `kmsvc-sdk`, `kmsvc-cli`).
This repo ships **`.proto` source + buf lint/breaking-change config only** — no generated code. Each consumer submodules this repo and runs its own `buf generate` with its own pinned plugin versions and `go_package` override (managed mode), so generated-runtime versions never need to match across repos — only the wire contract is shared.
## Consuming this repo
```bash
git submodule add https://forgejo.riotpiao.homelab.com/rock/kmsvc-proto.git proto
git -C proto checkout v1.0.0 # pin to a tag, don't track a moving branch
```
Then point your own `buf.gen.yaml` at `proto/proto` (this repo's proto root) and use managed mode to set your module's own `go_package`:
```yaml
version: v2
managed:
enabled: true
override:
- file_option: go_package
value: github.com/<you>/<your-module>/internal/genapi
plugins:
- local: protoc-gen-go
out: internal/genapi
opt: paths=source_relative
- local: protoc-gen-go-grpc
out: internal/genapi
opt: paths=source_relative
```
See `PLAN.md` for the full rollout plan (tagging convention, server migration, SDK/CLI wiring).