-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: switch the default Envoy version to 1.32
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
- Loading branch information
1 parent
21c6743
commit 0a24a69
Showing
14 changed files
with
124 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,64 @@ | ||
// Copyright The HTNN Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//go:build envoy1.29 || envoy1.31 | ||
|
||
package filtermanager | ||
|
||
import ( | ||
capi "github.com/envoyproxy/envoy/contrib/golang/common/go/api" | ||
|
||
"mosn.io/htnn/api/pkg/filtermanager/api" | ||
) | ||
|
||
const ( | ||
supportGettingHeadersOnLog = false | ||
) | ||
|
||
func (m *filterManager) OnLog(_ capi.RequestHeaderMap, _ capi.RequestTrailerMap, _ capi.ResponseHeaderMap, _ capi.ResponseTrailerMap) { | ||
if m.canSkipOnLog { | ||
return | ||
} | ||
|
||
var reqHdr api.RequestHeaderMap | ||
m.hdrLock.Lock() | ||
reqHdr = m.reqHdr | ||
m.hdrLock.Unlock() | ||
var rspHdr api.ResponseHeaderMap | ||
m.hdrLock.Lock() | ||
rspHdr = m.rspHdr | ||
m.hdrLock.Unlock() | ||
|
||
m.runOnLogPhase(reqHdr, nil, rspHdr, nil) | ||
} | ||
|
||
type filterManagerWrapper struct { | ||
*filterManager | ||
} | ||
|
||
func (w *filterManagerWrapper) OnLog() { | ||
w.filterManager.OnLog(nil, nil, nil, nil) | ||
} | ||
|
||
// we will get rid of this wrapper once Envoy 1.32 is released | ||
|
||
func wrapFilterManager(fm *filterManager) capi.StreamFilter { | ||
return &filterManagerWrapper{fm} | ||
} | ||
|
||
// This method is test only | ||
func unwrapFilterManager(wrapper capi.StreamFilter) *filterManager { | ||
fmw, _ := wrapper.(*filterManagerWrapper) | ||
return fmw.filterManager | ||
} |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
module mosn.io/htnn/e2e | ||
|
||
go 1.21.5 | ||
go 1.22 | ||
|
||
require ( | ||
github.com/avast/retry-go v3.0.0+incompatible | ||
|
This file contains 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 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 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 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 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