How ardikabs/gonvoy works
Gonvoy is a Go framework for implementing Envoy HTTP filter extensions with net/http-style request and response access. A Go extension registers a filter and configuration parser; Envoy then drives filter lifecycle and HTTP phases through Gonvoy’s handler chain and context, which expose request/response mutation and local replies. The README also documents logging, custom metrics, caching, and graceful panic handling. Some lifecycle and integration wiring is inferred from documented roles and the tree; unsampled implementation links are omitted where uncertain.
Main entry points: context.go Filter context · httpfilter_manager.go Phase manager · register.go Filter registration · context_httpfilter.go Request response access
Components 16
Envoy integration
- Filter registration
pkg/envoy/register.go - Config parsing
configparser.go - Filter factory
httpfilter.go
Filter lifecycle
- Filter lifecycle
httpfilter.go - Phase manager
httpfilter_manager.go - Handler chain
httpfilter_processor.go
HTTP processing
- Filter context
context.go - Request response access
context_httpfilter.go - Header access
header.go - Body access
body.go - Errors and replies
httpfilter_handler.go
Runtime services
- Logging
logger.go - Custom metrics
metrics.go - Runtime cache
cache.go
Other components
- Go extension
- Envoy Proxy
Connections 20
- Go extension → Filter registration: registers filter
- Filter registration → Filter factory: registers factory
- Filter registration → Config parsing: registers parser
- Envoy Proxy → Filter factory: requests filter
- Filter factory → Filter lifecycle: creates filter
- Config parsing → Filter lifecycle: provides config
- Envoy Proxy → Phase manager: drives phases
- Filter lifecycle → Phase manager: sets up handlers
- Phase manager → Handler chain: dispatches phases
- Phase manager → Filter context: provides context
- Handler chain → Filter context: uses context
- Filter context → Request response access: exposes HTTP
- Request response access → Header access: reads and modifies
- Request response access → Body access: reads and modifies
- Filter context → Errors and replies: sends local replies
- Phase manager → Errors and replies: handles failures
- Filter context → Logging: provides logger
- Filter context → Custom metrics: provides metrics
- Filter context → Runtime cache: provides cache
- Errors and replies → Logging: logs errors