Documentation
¶
Index ¶
- func InteractiveNixpacksPrompt() bool
- type CheckResult
- type Requirement
- type SystemChecker
- func (s *SystemChecker) CanInstallNixpacks() bool
- func (s *SystemChecker) CheckAll() *CheckResult
- func (s *SystemChecker) CheckDocker() (bool, string)
- func (s *SystemChecker) InstallNixpacks() error
- func (s *SystemChecker) PrintResults(result *CheckResult)
- func (s *SystemChecker) PromptNixpacksInstall() bool
- func (s *SystemChecker) SetPromptFunc(fn func() bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InteractiveNixpacksPrompt ¶ added in v0.7.0
func InteractiveNixpacksPrompt() bool
InteractiveNixpacksPrompt asks on the terminal whether to install Nixpacks. Use with SetPromptFunc for interactive CLI sessions.
Types ¶
type CheckResult ¶
type CheckResult struct {
Requirements []Requirement
AllRequired bool
AllOptional bool
}
CheckResult holds the results of system checks
type Requirement ¶
type Requirement struct {
Name string
Command string
Args []string
Required bool
Installed bool
Version string
InstallHint string
}
Requirement represents a system requirement
type SystemChecker ¶
type SystemChecker struct {
// contains filtered or unexported fields
}
SystemChecker checks system requirements
func NewSystemChecker ¶
func NewSystemChecker(verbose bool) *SystemChecker
NewSystemChecker creates a new system checker. By default the checker never prompts; interactive callers must inject a prompt with SetPromptFunc (see InteractiveNixpacksPrompt).
func (*SystemChecker) CanInstallNixpacks ¶ added in v0.3.0
func (s *SystemChecker) CanInstallNixpacks() bool
CanInstallNixpacks returns true when Tako can install Nixpacks through a local package manager.
func (*SystemChecker) CheckAll ¶
func (s *SystemChecker) CheckAll() *CheckResult
CheckAll checks all system requirements
func (*SystemChecker) CheckDocker ¶
func (s *SystemChecker) CheckDocker() (bool, string)
CheckDocker specifically checks if Docker daemon is running
func (*SystemChecker) InstallNixpacks ¶
func (s *SystemChecker) InstallNixpacks() error
InstallNixpacks installs Nixpacks based on the operating system
func (*SystemChecker) PrintResults ¶
func (s *SystemChecker) PrintResults(result *CheckResult)
PrintResults prints the check results in a formatted way
func (*SystemChecker) PromptNixpacksInstall ¶
func (s *SystemChecker) PromptNixpacksInstall() bool
PromptNixpacksInstall resolves whether to install Nixpacks using the injected prompt. Without an injected prompt it declines, so library embedders can never block on stdin.
func (*SystemChecker) SetPromptFunc ¶ added in v0.7.0
func (s *SystemChecker) SetPromptFunc(fn func() bool)
SetPromptFunc injects the decision used by PromptNixpacksInstall. Non-interactive embedders leave it unset (install is skipped).