Documentation ¶
Overview ¶
Package discovery implements configuration discovery.
Index ¶
Constants ¶
const Name = "discovery"
Name is the discovery plugin name that will be registered with the plugin manager.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { download.Config // bundle downloader configuration Name *string `json:"name"` // name of the discovery bundle Prefix *string `json:"prefix,omitempty"` // Deprecated: use `Resource` instead. Decision *string `json:"decision"` // the name of the query to run on the bundle to get the config Service string `json:"service"` // the name of the service used to download discovery bundle from Resource *string `json:"resource,omitempty"` // the resource path which will be downloaded from the service Signing *bundle.VerificationConfig `json:"signing,omitempty"` // configuration used to verify a signed bundle // contains filtered or unexported fields }
Config represents the configuration for the discovery feature.
type ConfigBuilder ¶ added in v0.22.0
type ConfigBuilder struct {
// contains filtered or unexported fields
}
ConfigBuilder assists in the construction of the plugin configuration.
func NewConfigBuilder ¶ added in v0.22.0
func NewConfigBuilder() *ConfigBuilder
NewConfigBuilder returns a new ConfigBuilder to build and parse the discovery config
func (*ConfigBuilder) Parse ¶ added in v0.22.0
func (b *ConfigBuilder) Parse() (*Config, error)
Parse returns a valid Config object with defaults injected.
func (*ConfigBuilder) WithBytes ¶ added in v0.22.0
func (b *ConfigBuilder) WithBytes(config []byte) *ConfigBuilder
WithBytes sets the raw discovery config
func (*ConfigBuilder) WithKeyConfigs ¶ added in v0.22.0
func (b *ConfigBuilder) WithKeyConfigs(keys map[string]*bundle.KeyConfig) *ConfigBuilder
WithKeyConfigs sets the public keys to verify a signed bundle
func (*ConfigBuilder) WithServices ¶ added in v0.22.0
func (b *ConfigBuilder) WithServices(services []string) *ConfigBuilder
WithServices sets the services that implement control plane APIs
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery implements configuration discovery for OPA. When discovery is started it will periodically download a configuration bundle and try to reconfigure the OPA.
func (*Discovery) Reconfigure ¶
Reconfigure is a no-op on discovery.