Documentation
¶
Index ¶
- func NewRuntimeDetectionCheck() *runtimeDetectionCheck
- type Check
- type CheckCategory
- type CheckResult
- type CheckRunner
- type CheckSeverity
- type CheckStatus
- type Doctor
- type DoctorOptions
- type ResultFormatter
- type RuntimeConnectivityCheck
- type RuntimeVersionCheck
- type Summary
- type VolumeConfigCheck
- type VolumeWriteTestCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRuntimeDetectionCheck ¶
func NewRuntimeDetectionCheck() *runtimeDetectionCheck
NewRuntimeDetectionCheck creates a new runtime detection check
Types ¶
type Check ¶
type Check struct {
Name string
Category CheckCategory
Severity CheckSeverity
ShouldRun bool
}
Check defines base metadata for a diagnostic check
func (*Check) NewCheckResult ¶
func (c *Check) NewCheckResult() CheckResult
NewCheckResult creates a base CheckResult for a check
type CheckCategory ¶
type CheckCategory string
CheckCategory groups related checks
const ( CategoryRuntime CheckCategory = "Container Runtime" CategoryConnectivity CheckCategory = "Runtime Connectivity" CategoryBuildTools CheckCategory = "Build Tools" CategoryNetwork CheckCategory = "Network Access" CategorySystem CheckCategory = "System Resources" CategoryPermissions CheckCategory = "User Permissions" CategoryGitHub CheckCategory = "GitHub Actions" )
type CheckResult ¶
type CheckResult struct {
Error error
Metadata map[string]interface{}
CheckName string
Category CheckCategory
Severity CheckSeverity
Status CheckStatus
Message string
Details []string
Suggestions []string
}
CheckResult contains check execution results
type CheckRunner ¶
type CheckRunner interface {
Run(ctx context.Context) CheckResult
GetCheck() *Check
}
CheckRunner interface defines the contract for running checks
type CheckSeverity ¶
type CheckSeverity string
CheckSeverity indicates check importance
const ( SeverityCritical CheckSeverity = "critical" // Must pass for engine-ci to work SeverityWarning CheckSeverity = "warning" // Should pass but engine-ci might work SeverityInfo CheckSeverity = "info" // Informational only )
type CheckStatus ¶
type CheckStatus string
CheckStatus represents check result
const ( StatusPass CheckStatus = "pass" StatusFail CheckStatus = "fail" StatusWarning CheckStatus = "warning" StatusSkipped CheckStatus = "skipped" )
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
Doctor coordinates diagnostic checks
func (*Doctor) RegisterCheck ¶
func (d *Doctor) RegisterCheck(check CheckRunner)
RegisterCheck adds a check to the doctor
type DoctorOptions ¶
type DoctorOptions struct {
Categories []CheckCategory
Verbose bool
JSONOutput bool
IncludeWarnings bool
Parallel bool
KeepTestContainers bool // Don't cleanup test containers (for debugging)
}
DoctorOptions configures doctor behavior
type ResultFormatter ¶
type ResultFormatter struct {
// contains filtered or unexported fields
}
ResultFormatter handles output formatting
func NewResultFormatter ¶
func NewResultFormatter(w io.Writer, verbose, jsonOutput, useColor bool) *ResultFormatter
NewResultFormatter creates a formatter
func (*ResultFormatter) FormatResults ¶
func (f *ResultFormatter) FormatResults(results []CheckResult) error
FormatResults outputs all results
type RuntimeConnectivityCheck ¶
type RuntimeConnectivityCheck struct {
*Check
}
RuntimeConnectivityCheck verifies runtime API connectivity
func NewRuntimeConnectivityCheck ¶
func NewRuntimeConnectivityCheck() *RuntimeConnectivityCheck
NewRuntimeConnectivityCheck creates a new runtime connectivity check
func (*RuntimeConnectivityCheck) Run ¶
func (c *RuntimeConnectivityCheck) Run(ctx context.Context) CheckResult
type RuntimeVersionCheck ¶
type RuntimeVersionCheck struct {
*Check
}
RuntimeVersionCheck verifies runtime version compatibility
func NewRuntimeVersionCheck ¶
func NewRuntimeVersionCheck() *RuntimeVersionCheck
NewRuntimeVersionCheck creates a new runtime version check
func (*RuntimeVersionCheck) Run ¶
func (c *RuntimeVersionCheck) Run(_ context.Context) CheckResult
type Summary ¶
type Summary struct {
Total int `json:"total"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Warnings int `json:"warnings"`
Skipped int `json:"skipped"`
Critical int `json:"critical_failures"`
}
Summary contains check result summary
type VolumeConfigCheck ¶
type VolumeConfigCheck struct {
*Check
}
VolumeConfigCheck verifies volume mount configuration
func NewVolumeConfigCheck ¶
func NewVolumeConfigCheck() *VolumeConfigCheck
NewVolumeConfigCheck creates a new volume configuration check
func (*VolumeConfigCheck) Run ¶
func (c *VolumeConfigCheck) Run(_ context.Context) CheckResult
type VolumeWriteTestCheck ¶
VolumeWriteTestCheck performs an integration test of volume mounting
func NewVolumeWriteTestCheck ¶
func NewVolumeWriteTestCheck(keepTestContainers bool) *VolumeWriteTestCheck
NewVolumeWriteTestCheck creates a new volume write test check
func (*VolumeWriteTestCheck) Run ¶
func (c *VolumeWriteTestCheck) Run(ctx context.Context) CheckResult