Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

probecube-api

ProbeCube 的 Proto 契约模块:Console 与 Agent 共用的消息定义在此,双方都以 Go module github.com/omalloc/probecube-api 依赖它,避免契约代码被其中一个仓库独占。

目录

buf.yaml       # buf module 配置(模块根 = 仓库根)
buf.gen.yaml   # protoc-gen-go 生成配置
message/v1/    # Console-Agent NATS 消息契约:message.proto + message.pb.go

message.pb.go 与 message.proto 同目录(paths=source_relative),改了 proto 必须重新生成。

重新生成

make api          # = buf generate,生成 message/v1/message.pb.go
make lint         # = buf lint
make breaking     # 与 main 分支做 wire 兼容性检查

依赖:buf(make init 安装)与 Go 1.26+。代码生成器以 go run ...@v1.36.11 形式锁定版本, 不需要在 PATH 里放 protoc。

契约约定

  • Go 包路径 = github.com/omalloc/probecube-api/message/v1,proto 包名 = message.v1。
  • 只放数据结构,不放 service:传输层是 Core NATS,subject 契约见 probecube-console/README.md 的 Agent 消息契约一节。
  • 字段只增不改:删除或改类型用 reserved,并跑 make breaking。

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages