ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(repo string, interval, timeout time.Duration, width int, demoMode bool, errorHistory int) error

Types

type AppStats

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

AppStats tracks application performance statistics

func NewAppStats

func NewAppStats() *AppStats

NewAppStats creates a new AppStats instance

func (*AppStats) GetCurrentMemoryKB

func (as *AppStats) GetCurrentMemoryKB() uint64

GetCurrentMemoryKB returns current memory usage in KB

func (*AppStats) GetDuration

func (as *AppStats) GetDuration() time.Duration

GetDuration returns the elapsed time since stats tracking started

func (*AppStats) GetMaxMemoryKB

func (as *AppStats) GetMaxMemoryKB() uint64

GetMaxMemoryKB returns maximum memory usage in KB

func (*AppStats) UpdateStats

func (as *AppStats) UpdateStats(goroutines int, memory uint64)

UpdateStats updates the current stats and tracks maximums

type CloneOperation

type CloneOperation interface {
	Execute(ctx context.Context, repo string) error
}

CloneOperation defines the interface for clone operations

type CloneRunner

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

CloneRunner handles the execution of clone operations with timing

func NewCloneRunner

func NewCloneRunner(demoMode bool, ticker <-chan time.Time, repo string, timeout time.Duration, resultC chan<- error) *CloneRunner

NewCloneRunner creates a new CloneRunner

func (*CloneRunner) Start

func (cr *CloneRunner) Start() tea.Cmd

Start returns a tea.Cmd that runs the clone operations

type DemoCloneOperation

type DemoCloneOperation struct{}

DemoCloneOperation implements simulated git cloning

func (*DemoCloneOperation) Execute

func (d *DemoCloneOperation) Execute(ctx context.Context, repo string) error

type ErrorStats

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

ErrorStats tracks error statistics with configurable history

func NewErrorStats

func NewErrorStats(maxRecent int) *ErrorStats

NewErrorStats creates a new ErrorStats instance

func (*ErrorStats) AddError

func (es *ErrorStats) AddError(err error, timestamp time.Time)

AddError adds an error to the tracking system

func (*ErrorStats) GetRecentErrors

func (es *ErrorStats) GetRecentErrors() []errorInfo

GetRecentErrors returns the recent errors for display

func (*ErrorStats) GetTotalErrors

func (es *ErrorStats) GetTotalErrors() int

GetTotalErrors returns the total number of errors encountered

type RealCloneOperation

type RealCloneOperation struct{}

RealCloneOperation implements actual git cloning

func (*RealCloneOperation) Execute

func (r *RealCloneOperation) Execute(ctx context.Context, repo string) error

type Styles

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

Centralized styling configuration

func NewStyles

func NewStyles(width int) *Styles

func (*Styles) Config

func (s *Styles) Config() lipgloss.Style

func (*Styles) Error

func (s *Styles) Error() lipgloss.Style

func (*Styles) Main

func (s *Styles) Main() lipgloss.Style

func (*Styles) Result

func (s *Styles) Result() lipgloss.Style

func (*Styles) SectionTitle

func (s *Styles) SectionTitle(text, color string) string

func (*Styles) Stats

func (s *Styles) Stats() lipgloss.Style

func (*Styles) Title

func (s *Styles) Title() lipgloss.Style

Jump to

Keyboard shortcuts

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