Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: poolable messages paths with wildcard #114

Open
evgfedotov opened this issue Nov 22, 2023 · 2 comments
Open

feature: poolable messages paths with wildcard #114

evgfedotov opened this issue Nov 22, 2023 · 2 comments

Comments

@evgfedotov
Copy link
Contributor

evgfedotov commented Nov 22, 2023

There are currently two ways to define messages to which the "pool" functionality will be applied:

  1. Via per-message optionvtproto.mempool
  2. 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).

@evgfedotov
Copy link
Contributor Author

@vmg, Hi!

I would be very grateful if you could watch this 😃

@vmg
Copy link
Member

vmg commented Nov 27, 2023

I followed up on #115 just this morning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants