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

Use enum for hook names #195

Merged
merged 6 commits into from
Mar 7, 2023
Merged

Use enum for hook names #195

merged 6 commits into from
Mar 7, 2023

Conversation

mostafa
Copy link
Member

@mostafa mostafa commented Mar 7, 2023

This PR removes string constants used for hook names with protobuf enums. It is now hard to get them wrong.
There are two compromises:

  1. The enum names are generated from protobuf file, and are very long, which is okay-ish.
  2. The plugin system currently doesn't support it, so when using enum values in PluginConfig["hooks"], they should be explicitly converted to int32. This will be fixed in Configuration management gatewayd-plugin-sdk#3.

Closes #190.

@mostafa mostafa merged commit 0f1a0e0 into main Mar 7, 2023
@mostafa mostafa deleted the use-enum-for-hook-names branch March 7, 2023 22:08
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

Successfully merging this pull request may close these issues.

Use enum/constant for hook names in protobuf
1 participant