Documentation
¶
Index ¶
- func BreakWithInPort(port *port.InPort) func(*Breakpoint)
- func BreakWithOutPort(port *port.OutPort) func(*Breakpoint)
- func BreakWithProcess(proc *process.Process) func(*Breakpoint)
- func BreakWithSymbol(sb *symbol.Symbol) func(*Breakpoint)
- type Agent
- func (a *Agent) Close()
- func (a *Agent) Frames(id uuid.UUID) []*Frame
- func (a *Agent) Load(sym *symbol.Symbol) error
- func (a *Agent) Process(id uuid.UUID) *process.Process
- func (a *Agent) Processes() []*process.Process
- func (a *Agent) Symbol(id uuid.UUID) *symbol.Symbol
- func (a *Agent) Symbols() []*symbol.Symbol
- func (a *Agent) Unload(sym *symbol.Symbol) error
- func (a *Agent) Unwatch(watcher Watcher) bool
- func (a *Agent) Watch(watcher Watcher) bool
- type Breakpoint
- func (b *Breakpoint) Close()
- func (b *Breakpoint) Done() bool
- func (b *Breakpoint) Frame() *Frame
- func (b *Breakpoint) ID() uuid.UUID
- func (b *Breakpoint) InPort() *port.InPort
- func (b *Breakpoint) MarshalJSON() ([]byte, error)
- func (b *Breakpoint) Next() bool
- func (b *Breakpoint) OnFrame(frame *Frame)
- func (b *Breakpoint) OnProcess(*process.Process)
- func (b *Breakpoint) OutPort() *port.OutPort
- func (b *Breakpoint) Process() *process.Process
- func (b *Breakpoint) Symbol() *symbol.Symbol
- type Config
- type Debugger
- func (d *Debugger) AddBreakpoint(bp *Breakpoint) bool
- func (d *Debugger) Breakpoint() *Breakpoint
- func (d *Debugger) Breakpoints() []*Breakpoint
- func (d *Debugger) Close()
- func (d *Debugger) Frame() *Frame
- func (d *Debugger) Pause(ctx context.Context) bool
- func (d *Debugger) Process() *process.Process
- func (d *Debugger) RemoveBreakpoint(bp *Breakpoint) bool
- func (d *Debugger) Step(ctx context.Context) bool
- func (d *Debugger) Symbol() *symbol.Symbol
- type Frame
- type Runtime
- type Watcher
- type Watchers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakWithInPort ¶ added in v0.12.0
func BreakWithInPort(port *port.InPort) func(*Breakpoint)
BreakWithInPort sets the input port associated with the breakpoint.
func BreakWithOutPort ¶ added in v0.12.0
func BreakWithOutPort(port *port.OutPort) func(*Breakpoint)
BreakWithOutPort sets the output port associated with the breakpoint.
func BreakWithProcess ¶ added in v0.12.0
func BreakWithProcess(proc *process.Process) func(*Breakpoint)
BreakWithProcess sets the process associated with the breakpoint.
func BreakWithSymbol ¶ added in v0.12.0
func BreakWithSymbol(sb *symbol.Symbol) func(*Breakpoint)
BreakWithSymbol sets the symbol associated with the breakpoint.
Types ¶
type Agent ¶ added in v0.12.0
type Agent struct {
// contains filtered or unexported fields
}
Agent manages symbols, processes, and hooks for ports and packets.
func NewAgent ¶ added in v0.12.0
func NewAgent() *Agent
NewAgent initializes and returns a new Agent.
func (*Agent) Close ¶ added in v0.12.0
func (a *Agent) Close()
Close clears all symbols, processes, and registered watchers.
func (*Agent) Frames ¶ added in v0.12.0
Frames returns the frames associated with a specific process UUID.
func (*Agent) Load ¶ added in v0.12.0
Load registers a symbol and its associated hooks for inbound and outbound ports.
type Breakpoint ¶ added in v0.12.0
type Breakpoint struct {
// contains filtered or unexported fields
}
Breakpoint represents a synchronization point in a process where execution can be paused and resumed.
func NewBreakpoint ¶ added in v0.12.0
func NewBreakpoint(options ...func(*Breakpoint)) *Breakpoint
NewBreakpoint creates a new Breakpoint with optional configurations.
func (*Breakpoint) Done ¶ added in v0.12.0
func (b *Breakpoint) Done() bool
Done completes the current frame's processing.
func (*Breakpoint) Frame ¶ added in v0.12.0
func (b *Breakpoint) Frame() *Frame
Frame returns the current frame under lock protection.
func (*Breakpoint) ID ¶ added in v0.12.0
func (b *Breakpoint) ID() uuid.UUID
ID returns the unique identifier of the breakpoint.
func (*Breakpoint) InPort ¶ added in v0.12.0
func (b *Breakpoint) InPort() *port.InPort
InPort returns the associated input port.
func (*Breakpoint) MarshalJSON ¶ added in v0.14.0
func (b *Breakpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for the Breakpoint type.
func (*Breakpoint) Next ¶ added in v0.12.0
func (b *Breakpoint) Next() bool
Next advances to the next frame, returning false if closed.
func (*Breakpoint) OnFrame ¶ added in v0.12.0
func (b *Breakpoint) OnFrame(frame *Frame)
OnFrame processes an incoming frame and synchronizes it.
func (*Breakpoint) OnProcess ¶ added in v0.12.0
func (b *Breakpoint) OnProcess(*process.Process)
OnProcess is a no-op but required by the Watcher interface.
func (*Breakpoint) OutPort ¶ added in v0.12.0
func (b *Breakpoint) OutPort() *port.OutPort
OutPort returns the associated output port.
func (*Breakpoint) Process ¶ added in v0.12.0
func (b *Breakpoint) Process() *process.Process
Process returns the associated process.
func (*Breakpoint) Symbol ¶ added in v0.12.0
func (b *Breakpoint) Symbol() *symbol.Symbol
Symbol returns the associated symbol.
type Config ¶
type Config struct {
Namespace string // Namespace defines the isolated execution environment for workflows.
Environment map[string]string // Environment holds the variables for the loader.
Hook *hook.Hook // Hook is a collection of hook functions for managing symbols.
Scheme *scheme.Scheme // Scheme defines the scheme and behaviors for symbols.
SpecStore driver.Store // SpecStore is responsible for persisting specifications.
ValueStore driver.Store // ValueStore is responsible for persisting values.
}
Config defines configuration options for the Runtime.
type Debugger ¶ added in v0.12.0
type Debugger struct {
// contains filtered or unexported fields
}
Debugger manages breakpoints and the debugging process.
func NewDebugger ¶ added in v0.12.0
NewDebugger creates a new Debugger instance with the specified agent.
func (*Debugger) AddBreakpoint ¶ added in v0.12.0
func (d *Debugger) AddBreakpoint(bp *Breakpoint) bool
AddBreakpoint adds a breakpoint and starts monitoring it.
func (*Debugger) Breakpoint ¶ added in v0.12.0
func (d *Debugger) Breakpoint() *Breakpoint
Breakpoint returns the currently active breakpoint.
func (*Debugger) Breakpoints ¶ added in v0.12.0
func (d *Debugger) Breakpoints() []*Breakpoint
Breakpoints returns all registered breakpoints.
func (*Debugger) Close ¶ added in v0.12.0
func (d *Debugger) Close()
Close stops monitoring breakpoints and releases resources.
func (*Debugger) Pause ¶ added in v0.12.0
Pause blocks until a breakpoint is hit or monitoring is done.
func (*Debugger) Process ¶ added in v0.12.0
Process retrieves the process linked to the current breakpoint.
func (*Debugger) RemoveBreakpoint ¶ added in v0.12.0
func (d *Debugger) RemoveBreakpoint(bp *Breakpoint) bool
RemoveBreakpoint deletes the specified breakpoint.
type Frame ¶ added in v0.12.0
type Frame struct {
Process *process.Process // The associated process handling this frame.
Symbol *symbol.Symbol // The symbol or metadata relevant to the current processing state.
InPort *port.InPort // Input port that receives the packet.
OutPort *port.OutPort // Output port that sends the processed packet.
InPck *packet.Packet // The incoming packet being processed.
OutPck *packet.Packet // The outgoing packet generated after processing.
InTime time.Time // Timestamp when the input packet was received.
OutTime time.Time // Timestamp when the output packet was sent.
}
Frame represents a processing unit that links a process with its input and output packets.
func (*Frame) MarshalJSON ¶ added in v0.14.0
MarshalJSON implements the json.Marshaler interface for the Frame type.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime represents an environment for executing Workflows.
func (*Runtime) Close ¶
Close shuts down the Runtime by closing streams and clearing the symbol table.
type Watcher ¶ added in v0.12.0
type Watcher interface {
// OnFrame is triggered when a Frame event occurs.
OnFrame(*Frame)
// OnProcess is triggered when a Process event occurs.
OnProcess(*process.Process)
}
Watcher defines methods for handling Frame and Process events.
func NewFrameWatcher ¶ added in v0.12.0
NewFrameWatcher creates a Watcher for handling Frame events.
func NewProcessWatcher ¶ added in v0.12.0
NewProcessWatcher creates a Watcher for handling Process events.