Documentation
¶
Overview ¶
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Package cmd provides the CLI commands for bosun.
Index ¶
Constants ¶
const ( // RadioTestTimeout is the HTTP timeout for testing the webhook endpoint. RadioTestTimeout = 5 * time.Second // MaxOnlinePeersDisplay is the maximum number of online tunnel peers to show. MaxOnlinePeersDisplay = 5 // TunnelStatusTimeout is the timeout for tunnel status checks. TunnelStatusTimeout = 10 * time.Second )
Radio command constants.
const ( // MaxPortDisplayLength is the maximum length for displaying port mappings before truncation. MaxPortDisplayLength = 40 // TruncatedPortLength is the length to truncate port display to when exceeding max. TruncatedPortLength = 37 // DefaultLogTailLines is the default number of log lines to show. DefaultLogTailLines = 100 )
Display limits for crew commands.
const ( // Display limits for diagnostics commands. // MaxRecentActivityDisplay is the maximum number of recent containers to show. MaxRecentActivityDisplay = 5 // MaxDeployTagsDisplay is the maximum number of deploy tags to show. MaxDeployTagsDisplay = 5 // MaxProvisionTimestamps is the maximum number of provision timestamps to show. MaxProvisionTimestamps = 10 // DefaultLogHistoryCount is the default number of log history entries to show. DefaultLogHistoryCount = 10 )
Command timeouts and display limits.
const ( // MaxErrorDisplay is the maximum number of error lines to show in mayday output. MaxErrorDisplay = 50 // MaxSnapshotDisplay is the maximum number of snapshots to show in list output. MaxSnapshotDisplay = 10 // MaxBackupDisplay is the maximum number of backups to show in list output. MaxBackupDisplay = 10 // MaxSnapshotPrompt is the maximum number of snapshots to show in interactive prompt. MaxSnapshotPrompt = 5 // ContainerLogTailLines is the number of log lines to fetch per container for error scanning. ContainerLogTailLines = 20 // DockerLogHeaderSize is the size of Docker's multiplexed log header in bytes. DockerLogHeaderSize = 8 // MaxExtractFileSize is the maximum file size allowed when extracting tar archives (100MB). MaxExtractFileSize = 100 * 1024 * 1024 // MaxExtractFileCount is the maximum number of files allowed in a tar archive (tar bomb protection). MaxExtractFileCount = 1000 // MaxExtractTotalSize is the maximum total size allowed when extracting tar archives (50GB). MaxExtractTotalSize = 50 * 1024 * 1024 * 1024 )
Emergency command display limits.
const ( // ComposeCommandTimeout is the maximum time allowed for compose commands. ComposeCommandTimeout = 5 * time.Minute )
Compose command timeouts.
const DefaultOperationTimeout = 30 * time.Second
DefaultOperationTimeout is the default timeout for Docker operations.
const (
// MaxDiffOutputLines is the maximum number of lines to show in diff output before truncation.
MaxDiffOutputLines = 50
)
Provision command display limits.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackupInfo ¶
BackupInfo contains information about a backup.
type CheckResult ¶
CheckResult holds the results of a diagnostic check.
func (*CheckResult) Add ¶
func (r *CheckResult) Add(other CheckResult)
Add combines two CheckResults.
type ComposeFile ¶
type ComposeFile struct {
Services map[string]struct {
Image string `yaml:"image"`
} `yaml:"services"`
}
ComposeFile represents a Docker Compose file structure for YAML parsing.
type ComposeFileWithDeps ¶
type ComposeFileWithDeps struct {
Services map[string]struct {
DependsOn any `yaml:"depends_on"`
} `yaml:"services"`
}
ComposeFileWithDeps represents a Docker Compose file with dependencies for YAML parsing.
type ComposeFileWithPorts ¶
type ComposeFileWithPorts struct {
Services map[string]ServiceWithPorts `yaml:"services"`
}
ComposeFileWithPorts represents a Docker Compose file structure for port extraction.
type PortMapping ¶
PortMapping represents a port extracted from a compose file.
type ServiceWithPorts ¶
type ServiceWithPorts struct {
Ports []any `yaml:"ports"`
Labels map[string]string `yaml:"labels"`
}
ServiceWithPorts represents a service with ports and labels.
type TailscalePeer ¶
type TailscalePeer struct {
DNSName string `json:"DNSName"`
HostName string `json:"HostName"`
TailscaleIPs []string `json:"TailscaleIPs"`
Online bool `json:"Online"`
ExitNode bool `json:"ExitNode"`
Active bool `json:"Active"`
}
TailscalePeer represents a peer in the Tailscale network. Kept for backwards compatibility with existing tests.
type TailscaleStatus ¶
type TailscaleStatus struct {
BackendState string `json:"BackendState"`
Self TailscalePeer `json:"Self"`
Peer map[string]TailscalePeer `json:"Peer"`
MagicDNSSuffix string `json:"MagicDNSSuffix"`
}
TailscaleStatus represents the JSON output of tailscale status --json. Kept for backwards compatibility with existing tests.
Source Files
¶
- alert.go
- breaker.go
- comms.go
- completions.go
- crew.go
- daemon.go
- diagnostics.go
- diagnostics_cycles.go
- diagnostics_doctor.go
- diagnostics_lint.go
- diagnostics_ports.go
- drift.go
- emergency.go
- helpers.go
- init.go
- migrate.go
- ports.go
- provision.go
- reconcile.go
- render.go
- root.go
- status.go
- trigger.go
- update.go
- upgrade.go
- validate.go
- webhook.go
- yacht.go