package discovery
import "github.com/open-policy-agent/opa/plugins/discovery"
Package discovery implements configuration discovery.
Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended. For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the github.com/open-policy-agent/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
Index ¶
- Constants
- func BootConfig(bootConfig map[string]interface{}) func(*Discovery)
- func Factories(fs map[string]plugins.Factory) func(*Discovery)
- func Hooks(hs hooks.Hooks) func(*Discovery)
- func Metrics(m metrics.Metrics) func(*Discovery)
- type Config
- type ConfigBuilder
- type Discovery
Constants ¶
const ( // Name is the discovery plugin name that will be registered with the plugin manager. Name = v1.Name )
Functions ¶
func BootConfig ¶
func Factories ¶
Factories provides a set of factory functions to use for instantiating custom plugins.
func Hooks ¶
func Metrics ¶
Metrics provides a metrics provider to pass to plugins.
Types ¶
type Config ¶
Config represents the configuration for the discovery feature.
func ParseConfig ¶
ParseConfig returns a valid Config object with defaults injected.
type ConfigBuilder ¶
type ConfigBuilder = v1.ConfigBuilder
ConfigBuilder assists in the construction of the plugin configuration.
func NewConfigBuilder ¶
func NewConfigBuilder() *ConfigBuilder
NewConfigBuilder returns a new ConfigBuilder to build and parse the discovery config
type Discovery ¶
Discovery implements configuration discovery for OPA. When discovery is started it will periodically download a configuration bundle and try to reconfigure the OPA.
func Lookup ¶
Lookup returns the discovery plugin registered with the manager.
func New ¶
New returns a new discovery plugin.
Source Files ¶
- Version
- v1.4.2 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 hours ago –
Tools for package owners.