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

golang filter: change register configFactory to filterFactory #32183

Merged
merged 2 commits into from
Feb 5, 2024

address comments.

f0c241f
Select commit
Loading
Failed to load commit list.
Merged

golang filter: change register configFactory to filterFactory #32183

address comments.
f0c241f
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Envoy/Windows succeeded Feb 5, 2024 in 30m 9s

Envoy/Windows (success)

Check has finished

Details

Check run finished (success ✔️)

The check run can be viewed here:

Envoy/Windows (pr/32183/main@f0c241f)

Check started by

Request (pr/32183/main@f0c241f)

doujiang24 @doujiang24 f0c241f #32183 merge main@12e928c

golang filter: change register configFactory to filterFactory

We followed the C++ style to register configFactory, but it's not a proper choice for Golang filter.
Here is the Reasons:

  1. Golang introduced the ConfigParser interface to Parse/validate a config, configFactory does not need to parse config.
  2. better performance. By using fiterFactory, we could ommit generate a closure per http request, that may take ~1ns.

Yep, this is a breaking change, people need to change the register API.
So, I suggest we fix it earlier.

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Environment

Request variables

Key Value
ref 21c18f44bfa2180da1ee1c9b6d5775461845f877
sha f0c241f
pr 32183
base-sha 12e928c
actor doujiang24 @doujiang24
message golang filter: change register configFactory to filterFactory...
started 1707106355.691536
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default envoyproxy/envoy-build-ubuntu:0ca52447572ee105a4730da5e76fe47c9c5a7c64
mobile envoyproxy/envoy-build-ubuntu:mobile-0ca52447572ee105a4730da5e76fe47c9c5a7c64
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 30
patch 0
dev true