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
pool
flag
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: directory
Instead 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: directory
For more flexibility it is also possible to add a flag to exclude some messages from pool
feature generation (something like pool-exclude).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels