Skip to content

Commit 61bb359

Browse files
authored
Updates Envoy to the latest (#35)
Notably, the latest main comes with: * Scheduler ABI: envoyproxy/envoy#39765 * Callouts ABI: envoyproxy/envoy#39151 Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
1 parent 72d5969 commit 61bb359

6 files changed

Lines changed: 31 additions & 9 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN CC="zig cc -target aarch64-linux-gnu" CXX="zig c++ -target aarch64-linux-gnu
4646
RUN CC="zig cc -target x86_64-linux-gnu" CXX="zig c++ -target x86_64-linux-gnu" CGO_ENABLED=1 GOARCH=amd64 go build -buildmode=c-shared -o /build/amd64_libgo_module.so .
4747

4848
##### Build the final image #####
49-
FROM envoyproxy/envoy-dev:5b88f941da971de57f29286103c20770811ec67f AS envoy
49+
FROM envoyproxy/envoy-dev:73fe00fc139fd5053f4c4a5d66569cc254449896 AS envoy
5050
ARG TARGETARCH
5151
ENV ENVOY_DYNAMIC_MODULES_SEARCH_PATH=/usr/local/lib
5252
COPY --from=rust_builder /build/${TARGETARCH}_librust_module.so /usr/local/lib/librust_module.so

ENVOY_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5b88f941da971de57f29286103c20770811ec67f
1+
73fe00fc139fd5053f4c4a5d66569cc254449896

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dynamic Modules Examples
22

3-
> Envoy Version: [5b88f941da971de57f29286103c20770811ec67f] v1.34
3+
> Envoy Version: [73fe00fc139fd5053f4c4a5d66569cc254449896] v1.35-dev
44
>
55
> Since dynamic modules are tied with a specific Envoy version, this repository is based on the specific commit of Envoy.
66
> For examples for a specific Envoy version, please check out `release/v<version>` branch, e.g. [`release/v1.34`](https://github.com/envoyproxy/dynamic-modules-examples/tree/release/v1.34).
@@ -87,6 +87,6 @@ If you want to explicitly specify the docker image, use `ENVOY_IMAGE` environmen
8787
ENVOY_IMAGE=foo-bar-image:latest go test . -v -count=1
8888
```
8989

90-
[5b88f941da971de57f29286103c20770811ec67f]: https://github.com/envoyproxy/envoy/tree/5b88f941da971de57f29286103c20770811ec67f
90+
[73fe00fc139fd5053f4c4a5d66569cc254449896]: https://github.com/envoyproxy/envoy/tree/73fe00fc139fd5053f4c4a5d66569cc254449896
9191
[Envoy]: https://github.com/envoyproxy/envoy
9292
[High Level Doc]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/dynamic_modules

go/gosdk/abi.go

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package gosdk
44

55
// Following is a distillation of the Envoy ABI for dynamic modules:
6-
// https://github.com/envoyproxy/envoy/blob/5b88f941da971de57f29286103c20770811ec67f/source/extensions/dynamic_modules/abi.h
6+
// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi.h
77
//
88
// Why not using the header file directly? That is because Go runtime complains
99
// about passing pointers to C code on the boundary. In the following code, we replace
@@ -136,8 +136,8 @@ import (
136136
"unsafe"
137137
)
138138

139-
// https://github.com/envoyproxy/envoy/blob/5b88f941da971de57f29286103c20770811ec67f/source/extensions/dynamic_modules/abi_version.h
140-
var version = append([]byte("0874b1e9587ef1dbd355ffde32f3caf424cb819df552de4833b2ed5b8996c18b"), 0)
139+
// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi_version.h
140+
var version = append([]byte("cb17cd829c177bc6b75a920283a3347b90d5aaa4d5e723eaa33bad31c8c5b9a9"), 0)
141141

142142
//export envoy_dynamic_module_on_program_init
143143
func envoy_dynamic_module_on_program_init() uintptr {
@@ -255,6 +255,28 @@ func envoy_dynamic_module_on_http_filter_response_trailers(uintptr, uintptr) uin
255255
func envoy_dynamic_module_on_http_filter_stream_complete(uintptr, uintptr) {
256256
}
257257

258+
//export envoy_dynamic_module_on_http_filter_http_callout_done
259+
func envoy_dynamic_module_on_http_filter_http_callout_done(
260+
filterEnvoyPtr uintptr,
261+
filterModulePtr uintptr,
262+
calloutID C.uint32_t,
263+
result C.uint32_t,
264+
headersPtr uintptr,
265+
headersSize C.size_t,
266+
bodyVectorPtr uintptr,
267+
bodyVectorSize C.size_t,
268+
) {
269+
panic("TODO")
270+
}
271+
272+
//export envoy_dynamic_module_on_http_filter_scheduled
273+
func envoy_dynamic_module_on_http_filter_scheduled(
274+
filterEnvoyPtr uintptr,
275+
filterModulePtr uintptr,
276+
eventID C.uint64_t) {
277+
panic("TODO")
278+
}
279+
258280
// GetRequestHeader implements [EnvoyHttpFilter].
259281
func (e envoyFilter) GetRequestHeader(key string) (string, bool) {
260282
keyPtr := uintptr(unsafe.Pointer(unsafe.StringData(key)))

rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/envoyproxy/dynamic-modules-example"
88

99
[dependencies]
1010
# The SDK version must match the Envoy version due to the strict compatibility requirements.
11-
envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "5b88f941da971de57f29286103c20770811ec67f" }
11+
envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "73fe00fc139fd5053f4c4a5d66569cc254449896" }
1212
serde = { version = "1.0", features = ["derive"] }
1313
serde_json = "1.0"
1414
rand = "0.9.0"

0 commit comments

Comments
 (0)