-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
There are currently two ways to define messages to which the "pool" functionality will be applied:
- Via per-message option
vtproto.mempool - By enumerating messages with the
poolflag
Both of these methods uncomfortable to use for large numbers of messages.
It might be worth adding the ability to use wildcards in pool flag to determine group of messages.
For example in my existing buf configuration:
version: v1
plugins:
- name: go-vtproto
path: bin/protoc-gen-go-vtproto
out: .
opt:
- features=marshal+unmarshal+size+pool+grpc
- paths=source_relative
- pool=github.com/some/api/example1.Message1
- pool=github.com/some/api/example2.Message2
- pool=...
- pool=github.com/some/api/example3.Message100
strategy: directoryInstead could be:
version: v1
plugins:
- name: go-vtproto
path: bin/protoc-gen-go-vtproto
out: .
opt:
- features=marshal+unmarshal+size+pool+grpc
- paths=source_relative
- pool=github.com/some/service/api/*
strategy: directoryFor more flexibility it is also possible to add a flag to exclude some messages from pool feature generation (something like pool-exclude).
Metadata
Metadata
Assignees
Labels
No labels