mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
c9042db15f
This adds a lightweight extensibility mechanism to OPA: hooks. Loosely modelled on what franz-go supports (see refs below). We're starting with a configuration hook. It allows us to inspect or alter the configuration of OPA after... 1. the config is read and parsed: OnConfig 2. a discovery bundle is processed: OnConfigDiscovery References: - franz-go: https://pkg.go.dev/github.com/twmb/franz-go/pkg/kgo#Hook To follow: - more hooks where they are useful - runtime support for hooks, wiring them into the proper other places Signed-off-by: Stephan Renatus <stephan@styra.com>