plano/envoyfilter
Adil Hafeez 6f6454069f
Improve demo experience (#28)
* Imrpove demo experience
- generate envoy.yaml using jinja2 template

* add todo

* add config file
2024-07-31 17:13:39 -07:00
..
grafana Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
prometheus Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
src update open-message-format (#30) 2024-07-31 15:56:13 -07:00
tests Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
build_filter.sh Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
Cargo.lock update open-message-format (#30) 2024-07-31 15:56:13 -07:00
Cargo.toml update open-message-format (#30) 2024-07-31 15:56:13 -07:00
docker-compose.yaml Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
Dockerfile Add workflow logic for weather forecast demo (#24) 2024-07-30 16:23:23 -07:00
envoy.template.yaml Improve demo experience (#28) 2024-07-31 17:13:39 -07:00
envoy.yaml Improve demo experience (#28) 2024-07-31 17:13:39 -07:00
init_vector_store.sh add embedding store (#10) 2024-07-18 14:04:51 -07:00
katanemo-config.yaml Improve demo experience (#28) 2024-07-31 17:13:39 -07:00
README.md Add initial integration style tests (#20) 2024-07-25 14:41:36 -07:00

Envoy filter code for gateway

Add toolchain

$ rustup target add wasm32-wasi

Building

$ cargo build --target wasm32-wasi --release

Testing

$ cargo test

Using in Envoy

This example can be run with docker compose and has a matching Envoy configuration.

$ docker compose up

Examples

Direct response.

Send HTTP request to localhost:10000/hello:

$ curl localhost:10000/hello

Expected response:

HTTP/1.1 200 OK
content-length: 40
content-type: text/plain
custom-header: katanemo filter
date: Wed, 10 Jul 2024 16:59:43 GMT
server: envoy

Inline call.

Send HTTP request to localhost:10000/inline:

$ curl localhost:10000/hello
{
  "headers": {
    "Accept": "*/*",
    "Host": "localhost",
    "User-Agent": "curl/7.81.0",
    "X-Amzn-Trace-Id": "Root=1-637c4767-6e31776a0b407a0219b5b570",
    "X-Envoy-Expected-Rq-Timeout-Ms": "15000"
  }
}

Expected Envoy logs:

[...] wasm log http_auth_random: Access granted.