breakpoint

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewController

func NewController() *controller

NewController returns a thread-safe Controller implementation.

Types

type BreakpointHit

type BreakpointHit struct {
	FlowID  store.FlowID
	Phase   Phase
	Headers map[string]string
	Body    []byte
	Meta    store.FlowMeta
}

BreakpointHit describes a paused flow awaiting user action.

type BreakpointResume

type BreakpointResume struct {
	Headers map[string]string
	Body    []byte
	Skipped bool
}

BreakpointResume carries the user's edits (or skip) back to the proxy goroutine.

type Controller

type Controller interface {
	Pause(hit BreakpointHit) BreakpointResume
	Subscribe() <-chan BreakpointHit
	Resume(flowID store.FlowID, resp BreakpointResume)
	Pending() []BreakpointHit
	ResumeAll()
}

Controller manages breakpoint pause/resume lifecycle.

type Phase

type Phase int

Phase indicates whether a breakpoint was hit during request or response.

const (
	PhaseRequest Phase = iota
	PhaseResponse
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL