mirror of
https://github.com/luxfi/zap.git
synced 2026-07-27 05:54:26 +00:00
zapgen: -skip-registry flag (private per-service kind namespace)
Sets Schema.SkipRegistry so a per-service schema set (e.g. Hanzo S3's Get/PutObject kinds) does NOT register into the shared zapv1.DefaultRegistry — their kind bytes are unique only within the service, not globally. Needed for the ZAP service-mesh pattern where every service owns a private kind space.
This commit is contained in:
@@ -60,6 +60,7 @@ func main() {
|
||||
flag.StringVar(&s.Package, "package", "", "output Go package name")
|
||||
flag.Var(&fieldFlag{&s.Fields}, "field", "field spec Name:Type:Offset (repeatable)")
|
||||
flag.StringVar(&outPath, "out", "", "output file path (default: stdout)")
|
||||
flag.BoolVar(&s.SkipRegistry, "skip-registry", false, "do not emit init() global Register — for a PRIVATE kind namespace (e.g. a per-service schema set whose kind bytes are unique only within that service, not the shared zapv1.DefaultRegistry)")
|
||||
flag.Parse()
|
||||
|
||||
if s.WireName == "" || s.GoName == "" || s.Package == "" || kind == 0 || size <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user