debug

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package debug provides an interactive TUI for debugging Cromwell workflow metadata.

Index

Constants

View Source
const (
	NodeTypeWorkflow    = debuginfo.NodeTypeWorkflow
	NodeTypeCall        = debuginfo.NodeTypeCall
	NodeTypeSubWorkflow = debuginfo.NodeTypeSubWorkflow
	NodeTypeShard       = debuginfo.NodeTypeShard
)

NodeType constants

Variables

This section is empty.

Functions

func ExpandIcon

func ExpandIcon(expanded bool, hasChildren bool) string

ExpandIcon returns the expand/collapse icon.

func NodeTypeIcon

func NodeTypeIcon(t NodeType) string

NodeTypeIcon returns an icon for the node type.

func StatusIcon

func StatusIcon(status string) string

StatusIcon returns an icon for the status.

func StatusStyle

func StatusStyle(status string) lipgloss.Style

StatusStyle returns the appropriate style for a status.

func TreePrefix

func TreePrefix(depth int, isLast bool, parentExpanded bool) string

TreePrefix returns the tree drawing prefix.

Types

type CallDetails

type CallDetails = debuginfo.CallDetails

Type aliases from debuginfo package for backward compatibility

type ExecutionEvent

type ExecutionEvent = debuginfo.ExecutionEvent

Type aliases from debuginfo package for backward compatibility

type Failure

type Failure = debuginfo.Failure

Type aliases from debuginfo package for backward compatibility

type KeyMap

type KeyMap struct {
	Up          key.Binding
	Down        key.Binding
	Left        key.Binding
	Right       key.Binding
	Enter       key.Binding
	Space       key.Binding
	Tab         key.Binding
	Quit        key.Binding
	Help        key.Binding
	Escape      key.Binding
	Details     key.Binding
	ExpandAll   key.Binding
	CollapseAll key.Binding
	Home        key.Binding
	End         key.Binding
	PageUp      key.Binding
	PageDown    key.Binding
	Copy        key.Binding
}

KeyMap defines all key bindings for the TUI.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the expanded help view.

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings to be shown in the mini help view.

type MetadataFetcher

type MetadataFetcher interface {
	GetRawMetadataWithOptions(ctx context.Context, workflowID string, expandSubWorkflows bool) ([]byte, error)
	GetWorkflowCost(ctx context.Context, workflowID string) (float64, string, error)
}

MetadataFetcher is an interface for fetching workflow metadata.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the main model for the debug TUI.

func NewModelWithDebugInfoAndMonitoring added in v1.0.2

func NewModelWithDebugInfoAndMonitoring(di *debuginfo.DebugInfo, fetcher MetadataFetcher, muc monitoringuc.Usecase, fp monitoring.FileProvider) Model

NewModelWithDebugInfoAndMonitoring creates a model with all dependencies.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages and updates the model.

func (Model) View

func (m Model) View() string

View renders the TUI.

type NodeType

type NodeType = debuginfo.NodeType

Type aliases from debuginfo package for backward compatibility

type NodeViewState added in v1.0.2

type NodeViewState struct {
	ViewMode   ViewMode
	LogCursor  int
	PanelFocus PanelFocus
}

NodeViewState persists the view state for a specific node.

type PanelFocus

type PanelFocus int

PanelFocus represents which panel has focus.

const (
	FocusTree PanelFocus = iota
	FocusDetails
)

type PreemptionStats

type PreemptionStats = debuginfo.PreemptionStats

Type aliases from debuginfo package for backward compatibility

type ProblematicTask

type ProblematicTask = debuginfo.ProblematicTask

Type aliases from debuginfo package for backward compatibility

type TreeNode

type TreeNode = debuginfo.TreeNode

Type aliases from debuginfo package for backward compatibility

type ViewMode

type ViewMode int

ViewMode represents the current view mode of the TUI.

const (
	ViewModeTree ViewMode = iota
	ViewModeDetails
	ViewModeCommand
	ViewModeLogs
	ViewModeInputs
	ViewModeOutputs
	ViewModeHelp
	ViewModeMonitor
)

type WorkflowMetadata

type WorkflowMetadata = debuginfo.WorkflowMetadata

Type aliases from debuginfo package for backward compatibility

type WorkflowPreemptionSummary

type WorkflowPreemptionSummary = debuginfo.WorkflowPreemptionSummary

Type aliases from debuginfo package for backward compatibility

Jump to

Keyboard shortcuts

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