Documentation
¶
Index ¶
- Variables
- func HasRunDebugFlag() bool
- func Setup(opts ...DebugOption) ([]app.SettingOption, error)
- type Collector
- func (c *Collector) AddEdge(edge DependencyEdge)
- func (c *Collector) GetComponents() []componentInfo
- func (c *Collector) GetEvents() []DebugEvent
- func (c *Collector) GetGraph() GraphData
- func (c *Collector) RecordEvent(event DebugEvent)
- func (c *Collector) RegisterComponent(name, typeName string)
- func (c *Collector) SetState(name string, state ComponentState)
- type ComponentState
- type Controller
- func (c *Controller) Close()
- func (c *Controller) GetBreakpoints() map[string]bool
- func (c *Controller) GetMode() StepMode
- func (c *Controller) Next()
- func (c *Controller) SetBreakpoint(component string, enabled bool)
- func (c *Controller) SetMode(mode StepMode)
- func (c *Controller) ShouldPause(componentName string) bool
- func (c *Controller) WaitForNext()
- type DebugEvent
- type DebugFactory
- func (df *DebugFactory) Close()
- func (df *DebugFactory) GetComponentByName(name string) (any, error)
- func (df *DebugFactory) GetComponents(opts ...container.Option) ([]any, error)
- func (df *DebugFactory) GetConfigure() configure.Configure
- func (df *DebugFactory) GetDefinitionRegistry() container.DefinitionRegistry
- func (df *DebugFactory) GetDefinitionRegistryPostProcessors() []container.DefinitionRegistryPostProcessor
- func (df *DebugFactory) GetRegisteredComponents() map[string]any
- func (df *DebugFactory) PrepareComponents() error
- func (df *DebugFactory) Refresh() error
- func (df *DebugFactory) SetConfigure(c configure.Configure)
- func (df *DebugFactory) SetContext(ctx context.Context)
- func (df *DebugFactory) SetRegistry(r container.SingletonRegistry)
- type DebugOption
- type DependencyEdge
- type GraphData
- type GraphNode
- type Server
- type StepMode
Constants ¶
This section is empty.
Variables ¶
View Source
var StaticFS embed.FS
Functions ¶
func HasRunDebugFlag ¶ added in v1.6.1
func HasRunDebugFlag() bool
HasCLIFlag checks whether --ioc:run_debug is present in os.Args.
func Setup ¶ added in v1.6.1
func Setup(opts ...DebugOption) ([]app.SettingOption, error)
Setup creates the debug infrastructure, starts the debug server, opens the browser, and returns the app.SettingOption slice to apply. It also auto-detects the --ioc:dry_run CLI flag.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector() *Collector
func (*Collector) AddEdge ¶
func (c *Collector) AddEdge(edge DependencyEdge)
func (*Collector) GetComponents ¶
func (c *Collector) GetComponents() []componentInfo
func (*Collector) GetEvents ¶
func (c *Collector) GetEvents() []DebugEvent
func (*Collector) RecordEvent ¶
func (c *Collector) RecordEvent(event DebugEvent)
func (*Collector) RegisterComponent ¶
func (*Collector) SetState ¶
func (c *Collector) SetState(name string, state ComponentState)
type ComponentState ¶
type ComponentState string
const ( StateRegistered ComponentState = "registered" StateScanned ComponentState = "scanned" StateCreating ComponentState = "creating" StatePopulating ComponentState = "populating" StateInitializing ComponentState = "initializing" StateReady ComponentState = "ready" )
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() *Controller
func (*Controller) Close ¶
func (c *Controller) Close()
func (*Controller) GetBreakpoints ¶
func (c *Controller) GetBreakpoints() map[string]bool
func (*Controller) GetMode ¶
func (c *Controller) GetMode() StepMode
func (*Controller) SetBreakpoint ¶
func (c *Controller) SetBreakpoint(component string, enabled bool)
func (*Controller) SetMode ¶
func (c *Controller) SetMode(mode StepMode)
func (*Controller) ShouldPause ¶
func (c *Controller) ShouldPause(componentName string) bool
func (*Controller) WaitForNext ¶
func (c *Controller) WaitForNext()
WaitForNext blocks until the user signals to proceed or mode is Run.
type DebugEvent ¶
type DebugEvent struct {
ID int `json:"id"`
Phase string `json:"phase"`
Action string `json:"action"`
ComponentName string `json:"componentName,omitempty"`
ProcessorName string `json:"processorName,omitempty"`
Details map[string]any `json:"details,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
type DebugFactory ¶
type DebugFactory struct {
// contains filtered or unexported fields
}
func (*DebugFactory) Close ¶
func (df *DebugFactory) Close()
func (*DebugFactory) GetComponentByName ¶
func (df *DebugFactory) GetComponentByName(name string) (any, error)
func (*DebugFactory) GetComponents ¶
func (df *DebugFactory) GetComponents(opts ...container.Option) ([]any, error)
func (*DebugFactory) GetConfigure ¶
func (df *DebugFactory) GetConfigure() configure.Configure
func (*DebugFactory) GetDefinitionRegistry ¶
func (df *DebugFactory) GetDefinitionRegistry() container.DefinitionRegistry
func (*DebugFactory) GetDefinitionRegistryPostProcessors ¶
func (df *DebugFactory) GetDefinitionRegistryPostProcessors() []container.DefinitionRegistryPostProcessor
func (*DebugFactory) GetRegisteredComponents ¶
func (df *DebugFactory) GetRegisteredComponents() map[string]any
func (*DebugFactory) PrepareComponents ¶
func (df *DebugFactory) PrepareComponents() error
func (*DebugFactory) Refresh ¶
func (df *DebugFactory) Refresh() error
func (*DebugFactory) SetConfigure ¶
func (df *DebugFactory) SetConfigure(c configure.Configure)
func (*DebugFactory) SetContext ¶
func (df *DebugFactory) SetContext(ctx context.Context)
func (*DebugFactory) SetRegistry ¶
func (df *DebugFactory) SetRegistry(r container.SingletonRegistry)
type DebugOption ¶ added in v1.6.1
type DebugOption func(*DebugFactory)
func WithDryRun ¶ added in v1.6.1
func WithDryRun() DebugOption
type DependencyEdge ¶
type GraphData ¶
type GraphData struct {
Nodes []GraphNode `json:"nodes"`
Edges []DependencyEdge `json:"edges"`
}
type GraphNode ¶
type GraphNode struct {
Name string `json:"name"`
Type string `json:"type"`
State ComponentState `json:"state"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(controller *Controller, collector *Collector, staticFS fs.FS) *Server
func (*Server) BroadcastEvent ¶
func (s *Server) BroadcastEvent(event DebugEvent)
BroadcastEvent sends a debug event to all connected SSE clients.
Click to show internal directories.
Click to hide internal directories.