Documentation
¶
Overview ¶
Package debug EXPERIMENTAL: This package is under active development and is subject to change.
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
- type Breakpoint
- type BreakpointID
- type Debugger
- type DebuggerOption
- type Event
- type EventHandler
- type EventType
- type FrameID
- type LaunchEvalProperties
- type LaunchOption
- type LaunchProperties
- type LaunchTestProperties
- type Scope
- type Session
- type StackFrame
- type StackTrace
- type Thread
- type ThreadID
- type VarRef
- type Variable
Constants ¶
const ( ExceptionEventType = v1.ExceptionEventType StdoutEventType = v1.StdoutEventType StoppedEventType = v1.StoppedEventType TerminatedEventType = v1.TerminatedEventType ThreadEventType = v1.ThreadEventType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Breakpoint ¶
type Breakpoint = v1.Breakpoint
type BreakpointID ¶
type BreakpointID = v1.BreakpointID
type Debugger ¶
Debugger is the interface for launching OPA debugger Session(s). This implementation is similar in structure to the Debug Adapter Protocol (DAP) to make such integrations easier, but is not intended to be a direct implementation. See: https://microsoft.github.io/debug-adapter-protocol/specification
EXPERIMENTAL: These interfaces are under active development and is subject to change.
func NewDebugger ¶
func NewDebugger(options ...DebuggerOption) Debugger
type DebuggerOption ¶
type DebuggerOption = v1.DebuggerOption
func SetEventHandler ¶
func SetEventHandler(handler EventHandler) DebuggerOption
func SetLogger ¶
func SetLogger(logger logging.Logger) DebuggerOption
type EventHandler ¶
type EventHandler = v1.EventHandler
type LaunchEvalProperties ¶
type LaunchEvalProperties = v1.LaunchEvalProperties
type LaunchOption ¶ added in v0.69.0
type LaunchOption = v1.LaunchOption
func RegoOption ¶ added in v0.69.0
func RegoOption(opt func(*rego.Rego)) LaunchOption
RegoOption adds a rego option to the internal Rego instance. Options may be overridden by the debugger, and it is recommended to use LaunchEvalProperties for commonly used options.
type LaunchProperties ¶
type LaunchProperties = v1.LaunchProperties
type LaunchTestProperties ¶
type LaunchTestProperties = v1.LaunchTestProperties
type StackFrame ¶
type StackFrame = v1.StackFrame