-
Notifications
You must be signed in to change notification settings - Fork 5.3k
WiP: Local reply mapper #8126
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
Closed
Closed
WiP: Local reply mapper #8126
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
899ec21
Init work with configuration proposition
6da905d
Added missing dependency
8eb6f82
Merge branch 'master' into local_reply_mapper
9bf0e6b
Without passed config
fc3c545
WIP config
c9a686e
Response flags added
4213f2e
Applied changes from code review
f8df3ae
repeated match
dac4695
Merge branch 'master' into local_reply_mapper
052aeeb
WIP local reply formatter with access log reuse
1499746
Merge branch 'master' into local_reply_mapper
8f022b6
Added mapper config
419a59c
Changed to access log filter
468308a
Merge branch 'master' into local_reply_mapper
1cce878
Cleanup and initial work docs
1efc2e3
Cleanup and initial work docs
7c75f6c
added comments
2670d0f
Added possibility to define custom format for each mapper
955bf79
Merge branch 'master' into local_reply_mapper
cd31254
Extracted new format StringOrJson
a77c82f
Removed docs and fixed format. I will provide docs file with implemen…
20abff0
Merge branch 'master' into local_reply_mapper
9c8d757
Added more docs
cc55bb4
Merge branch 'master' into local_reply_mapper
7784130
Code review fix
31f3cbf
Merge branch 'master' into local_reply_mapper
5eadeca
Fix build
199dd43
Merge branch 'master' into local_reply_mapper
0aee07a
Generated v3 files
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.type; | ||
|
|
||
| option java_outer_classname = "FormatProto"; | ||
| option java_multiple_files = true; | ||
| option java_package = "io.envoyproxy.envoy.type"; | ||
|
|
||
| import "google/protobuf/struct.proto"; | ||
|
|
||
| // [#protodoc-title: Format] | ||
|
|
||
| // Allows to define one of format: flat plain text or structured json. | ||
| message StringOrJson { | ||
| oneof format { | ||
| // Allows to specify flat plain text format. | ||
| // | ||
| // .. code-block:: yaml | ||
| // | ||
| // string_format: "My custom message" | ||
| // | ||
| string string_format = 1; | ||
|
|
||
| // Allows to specify structured data as json. | ||
| // | ||
| // .. code-block:: yaml | ||
| // | ||
| // json_format: | ||
| // protocol: "HTTP/1.1" | ||
| // message: "My message" | ||
| // | ||
| // The following JSON object would be created: | ||
| // | ||
| // .. code-block:: json | ||
| // | ||
| // { | ||
| // "protocol": "HTTP/1.1", | ||
| // "message": "My message" | ||
| // } | ||
| // | ||
| google.protobuf.Struct json_format = 2; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.type.v3alpha; | ||
|
|
||
| option java_outer_classname = "FormatProto"; | ||
| option java_multiple_files = true; | ||
| option java_package = "io.envoyproxy.envoy.type.v3alpha"; | ||
|
|
||
| import "google/protobuf/struct.proto"; | ||
|
|
||
| // [#protodoc-title: Format] | ||
|
|
||
| // Allows to define one of format: flat plain text or structured json. | ||
| message StringOrJson { | ||
| oneof format { | ||
| // Allows to specify flat plain text format. | ||
| // | ||
| // .. code-block:: yaml | ||
| // | ||
| // string_format: "My custom message" | ||
| // | ||
| string string_format = 1; | ||
|
|
||
| // Allows to specify structured data as json. | ||
| // | ||
| // .. code-block:: yaml | ||
| // | ||
| // json_format: | ||
| // protocol: "HTTP/1.1" | ||
| // message: "My message" | ||
| // | ||
| // The following JSON object would be created: | ||
| // | ||
| // .. code-block:: json | ||
| // | ||
| // { | ||
| // "protocol": "HTTP/1.1", | ||
| // "message": "My message" | ||
| // } | ||
| // | ||
| google.protobuf.Struct json_format = 2; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -718,6 +718,7 @@ resolvers | |
| resync | ||
| ret | ||
| retriable | ||
| rewriter | ||
| rpcs | ||
| rq | ||
| rtrim | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this just be
uint32?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be good to keep this field optional if in future someone want to add e.g: headers, body.