Golang
Overview
The HTTP Golang filter allows Golang to be run during both the request and response flows and makes it easier to extend Envoy. See the Envoy’s GoLang extension proposal documentation for more details.
Configuration
This filter should be configured with the type URL
type.googleapis.com/envoy.extensions.filters.http.golang.v3alpha.Config
.
A simple example of configuring Golang HTTP filter that default echo go plugin as follow:
name: envoy.filters.http.golang
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.golang.v3alpha.Config
library_id: echo-id
library_path: "contrib/golang/filters/http/test/test_data/echo/filter.so"
plugin_name: echo
Attention
The go plugin dynamic library built needs to be consistent with the envoy version of glibc.
Complete example
A complete example using Docker is available in /contrib/golang/filters/http/test/test_data/echo and run
bazel build //contrib/golang/filters/http/test/test_data/echo:filter.so
.