Skip to content

Commit

Permalink
update example to adapt Envoy 1.31
Browse files Browse the repository at this point in the history
and some more chore changes.
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Sep 24, 2024
1 parent d01ea9d commit 843fa48
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/dev_your_plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ DOCKER_MIRROR = m.daocloud.io/
# Both images use glibc 2.31. Ensure libc in the images match each other.
BUILD_IMAGE ?= $(DOCKER_MIRROR)docker.io/library/golang:1.21-bullseye
# We don't use istio/proxyv2 because it is not designed to be run separately (need to work around permission issue).
PROXY_IMAGE ?= $(DOCKER_MIRROR)docker.io/envoyproxy/envoy:contrib-v1.29.5
PROXY_IMAGE ?= $(DOCKER_MIRROR)docker.io/envoyproxy/envoy:contrib-v1.31.2
# We may need to use timestamp if we need to update the image in one PR
DEV_TOOLS_IMAGE ?= $(DOCKER_MIRROR)ghcr.io/mosn/htnn-dev-tools:2024-03-05
DEV_TOOLS_IMAGE ?= $(DOCKER_MIRROR)ghcr.io/mosn/htnn-dev-tools:2024-07-12

PROTOC = protoc

Expand Down
2 changes: 1 addition & 1 deletion examples/dev_your_plugin/cmd/libgolang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func init() {
http.RegisterHttpFilterConfigFactoryAndParser("fm", filtermanager.FilterManagerFactory, &filtermanager.FilterManagerConfigParser{})
http.RegisterHttpFilterFactoryAndConfigParser("fm", filtermanager.FilterManagerFactory, &filtermanager.FilterManagerConfigParser{})
}

func main() {}
6 changes: 3 additions & 3 deletions examples/dev_your_plugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module mosn.io/htnn/dev_your_plugin
go 1.21

require (
github.com/envoyproxy/envoy v1.29.4
github.com/envoyproxy/envoy v1.31.0
github.com/stretchr/testify v1.9.0
google.golang.org/protobuf v1.33.0
mosn.io/htnn/api v0.3.2
google.golang.org/protobuf v1.34.1
mosn.io/htnn/api v0.3.3-0.20240924080219-d01ea9d6301e
)

require (
Expand Down
12 changes: 6 additions & 6 deletions examples/dev_your_plugin/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/P
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/envoy v1.29.4 h1:1c52LYxzA6arnSjpTfDyxCSrtztwVAnzekcGHirvq8Y=
github.com/envoyproxy/envoy v1.29.4/go.mod h1:c2OGLXJVY9BaTYPiWFRz6eUNaC+3TfqFKmkWS9brdKo=
github.com/envoyproxy/envoy v1.31.0 h1:NsTo+medzu0bMffXAjl+zKaViLOShKuIZWQnKKYq0/4=
github.com/envoyproxy/envoy v1.31.0/go.mod h1:ujBFxE543X8OePZG+FbeR9LnpBxTLu64IAU7A20EB9A=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240117015050-472addddff92 h1:/3bsjkhOTh0swUKDBxL1+3MrXCxrf/sEEMseiIEJg00=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240117015050-472addddff92/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
Expand Down Expand Up @@ -50,12 +50,12 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mosn.io/htnn/api v0.3.2 h1:3j63WhEkurhqCcly5PxDQkrP59AbIt2Qn0DwpsukQnU=
mosn.io/htnn/api v0.3.2/go.mod h1:DumqbmMou8J1/DzEDaRIZWpan82bOqxGceWxTju7WkU=
mosn.io/htnn/api v0.3.3-0.20240924080219-d01ea9d6301e h1:1BhDXAM4E1q4rKuOx61F2yozOKnazOg+Yj36UGiHPqs=
mosn.io/htnn/api v0.3.3-0.20240924080219-d01ea9d6301e/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
2 changes: 1 addition & 1 deletion plugins/plugins/demo/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type filter struct {
config *config
}

// The doc of each API can be found in package pkg/filtermanager/api
// The doc of each API can be found in https://pkg.go.dev/mosn.io/htnn/api/pkg/filtermanager/api

func (f *filter) DecodeHeaders(headers api.RequestHeaderMap, endStream bool) api.ResultAction {
headers.Add(f.config.HostName, f.hello())
Expand Down

0 comments on commit 843fa48

Please sign in to comment.