Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK extensibility: add hooks (plugins, discovery, sdk) #6053

Merged
merged 3 commits into from
Jun 29, 2023

Commits on Jun 29, 2023

  1. extensibility: add hooks (plugins, discovery, sdk)

    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>
    srenatus committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    e57714f View commit details
    Browse the repository at this point in the history
  2. build: add errors.Join workaround for go <1.20

    Signed-off-by: Stephan Renatus <stephan@styra.com>
    srenatus committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    b808f9e View commit details
    Browse the repository at this point in the history
  3. config: fix 'Extra' oversight wrt 'nil' vs empty map

    Signed-off-by: Stephan Renatus <stephan@styra.com>
    srenatus committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    afabb36 View commit details
    Browse the repository at this point in the history