Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsistencyReport ¶
type ConsistencyReport struct {
OrphanedRegistryEntries []string // In registry but no directory
OrphanedDirectories []string // Directory exists but not in registry
OrphanedContainers []string // Containers running but not in registry
InvalidWorktrees []string // Directory exists but not valid git worktree
}
ConsistencyReport contains registry/directory/container consistency issues
func CheckConsistency ¶
func CheckConsistency(cfg *config.Config, reg *registry.Registry, projectName string) ConsistencyReport
CheckConsistency checks for mismatches between registry, directories, and containers
type DockerHealth ¶
type DockerHealth struct {
Installed bool
Running bool
ComposeAvailable bool
Version string
Error string
}
DockerHealth contains Docker availability status
func CheckDocker ¶
func CheckDocker() DockerHealth
CheckDocker checks Docker installation and availability
type GitStatusReport ¶
type GitStatusReport struct {
Feature string
Branch string
UncommittedCount int
BehindMain int
AheadOrigin int
BranchExists bool
YoloMode bool
Error string
}
GitStatusReport contains git status for a single worktree
func CheckGitStatus ¶
func CheckGitStatus(cfg *config.Config, wt *registry.Worktree, projectPath string, fetch bool) GitStatusReport
CheckGitStatus checks git status for a worktree using the given project path as the git directory.
type PortAllocation ¶
PortAllocation tracks which feature/service uses a port
type PortConflict ¶
PortConflict represents a port that's allocated but in use
type PortOutOfRange ¶
PortOutOfRange represents a port allocation outside configured ranges
type PortRangeInfo ¶
PortRangeInfo contains information about a port range
type PortReport ¶
type PortReport struct {
Conflicts []PortConflict
OutOfRange []PortOutOfRange
TotalAllocated int
TotalAvailable int
PortRanges map[string]PortRangeInfo
}
PortReport contains port allocation status
func CheckPorts ¶
func CheckPorts(reg *registry.Registry, workCfg *config.WorktreeConfig) PortReport
CheckPorts checks port allocations for conflicts and range violations
type Report ¶
type Report struct {
Docker DockerHealth
Consistency ConsistencyReport
GitStatus []GitStatusReport
Staleness []StalenessReport
Ports PortReport
Summary Summary
}
Report contains all diagnostic results
func RunHealthCheck ¶
func RunHealthCheck(cfg *config.Config, workCfg *config.WorktreeConfig, reg *registry.Registry, opts Options) *Report
RunHealthCheck runs all diagnostic checks and returns a comprehensive report
type StalenessReport ¶
type StalenessReport struct {
Feature string
Branch string
LastModified time.Time
DaysSinceModified int
BranchMerged bool
MergedDate string
NoContainers bool
Score int // 0-3 based on criteria met
}
StalenessReport contains staleness metrics for a worktree
func CheckStaleness ¶
func CheckStaleness(cfg *config.Config, wt *registry.Worktree, projectName string, projectPath string) StalenessReport
CheckStaleness checks if a worktree is stale based on multiple criteria. projectPath is the path to the first project directory within the worktree (used for git operations).