Skip to content

Commit

Permalink
add AddData
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Nov 12, 2024
1 parent 2118fd9 commit 1f9756f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ jobs:
FULL_ENVOY_VERSION=${ENVOY_API_VERSION}.0
if [[ $ENVOY_API_VERSION == dev ]]; then
# update this once there are more breaking changes
FULL_ENVOY_VERSION=1.32.1-0.20241102031349-fcdc9d6d5a9d
# This is the envoy:contrib-dev image pull in 2024-11-04.
FULL_ENVOY_VERSION=1.32.1-0.20241112025658-4fd9bb670eeb
# This is the envoy:contrib-dev image pull in 2024-11-12.
# Use docker inspect --format='{{index .RepoDigests 0}}' envoyproxy/envoy:contrib-dev to get the sha256 ID.
# We don't use the envoy:contrib-dev tag directly because it will be rewritten by the latest commit and
# our test suite uses IfPresent policy to pull image.
# We don't use the CI to catch the breaking change from the upstream so far.
export PROXY_IMAGE=envoyproxy/envoy@sha256:d7e833bc15746ff10734cabfbe9211d637ce4ea1d4e1bb678ed13b91e602a647
export PROXY_IMAGE=envoyproxy/envoy@sha256:0eec2cbd45c2055ea37c2321e8b83f6907a95e98c250492b48ad9dab6a20a8cb
echo PROXY_IMAGE=$PROXY_IMAGE >> $GITHUB_ENV
fi
pushd ..
Expand Down
4 changes: 4 additions & 0 deletions api/pkg/filtermanager/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ type FilterProcessCallbacks interface {
SendLocalReply(responseCode int, bodyText string, headers map[string][]string, grpcStatus int64, details string)
// RecoverPanic recover panic in defer and terminate the request by SendLocalReply with 500 status code.
RecoverPanic()
// AddData add extra data when processing headers/trailers.
// For example, turn a headers only request into a request with a body, add more body when processing trailers, and so on.
// The second argument isStreaming supplies if this caller streams data or buffers the full body.
AddData(data []byte, isStreaming bool)

// hide Continue() method from the user
}
Expand Down
3 changes: 3 additions & 0 deletions api/plugins/tests/pkg/envoy/capi.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ func (i *filterCallbackHandler) ClearRouteCache() {
func (i *filterCallbackHandler) RefreshRouteCache() {
}

func (i *filterCallbackHandler) AddData([]byte, bool) {
}

func (i *filterCallbackHandler) LookupConsumer(_, _ string) (api.Consumer, bool) {
return nil, false
}
Expand Down

0 comments on commit 1f9756f

Please sign in to comment.