package
1.2.0
Repository: https://github.com/open-policy-agent/opa.git
Documentation: pkg.go.dev

# Packages

Package bundle implements bundle loading.
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.
Package logs implements decision log buffering and uploading.
Package rest implements a REST client for communicating with remote services.
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.
Package status implements status reporting.

# Functions

ConsoleLogger sets the passed logger to be used by plugins that are configured with console logging enabled.
GetCompilerOnContext gets the compiler cached on the storage context.
GracefulShutdownPeriod passes the configured graceful shutdown period to plugins.
Info sets the runtime information on the manager.
InitBundles provides the initial set of bundles to load.
InitFiles provides the initial set of other data/policy files to load.
Logger configures the passed logger on the plugin manager (useful to configure default fields).
MaxErrors sets the error limit for the manager's shared compiler.
New creates a new Manager using config.
SetCompilerOnContext puts the compiler into the storage context.
SetWasmResolversOnContext puts a set of Wasm Resolvers into the storage context.
ValidateAndInjectDefaultsForTriggerMode validates the trigger mode and injects default values.
WithDistributedTracingOpts sets the options to be used by distributed tracing.
WithEnableTelemetry controls whether OPA will send telemetry reports to an external service.
WithHooks allows passing hooks to the plugin manager.
WithParserOptions sets the parser options to be used by the plugin manager.
WithPrometheusRegister sets the passed prometheus.Registerer to be used by plugins.
WithTelemetryGatherers allows registration of telemetry gatherers which enable injection of additional data in the telemetry report.
WithTracerProvider sets the passed *trace.TracerProvider to be used by plugins.

# Constants

DefaultTriggerMode represents default trigger mechanism.
StateErr indicates that the Plugin is in an error state and should not be considered as functional.
StateNotReady indicates that the Plugin is not in an error state, but isn't ready for normal operation yet.
StateOK signifies that the Plugin is operating normally.
StateWarn indicates the Plugin is operating, but in a potentially dangerous or degraded state.
TriggerManual represents manual triggering mechanism.
TriggerPeriodic represents periodic polling mechanism.

# Type aliases

Factory defines the interface OPA uses to instantiate your plugin.
Manager implements lifecycle management of plugins and gives plugins access to engine-wide components like storage.
Plugin defines the interface OPA uses to manage your plugin.
State defines the state that a Plugin instance is currently in with pre-defined states.
Status has a Plugin's current status plus an optional Message.
StatusListener defines a handler to register for status updates.
Triggerable defines the interface plugins use for manual plugin triggers.
TriggerMode defines the trigger mode utilized by a Plugin for bundle download, log upload etc.