Documentation ¶
Index ¶
- Constants
- Variables
- func RunDeployPreflightCheck(opts DeployPreflightCheckOptions) (string, error)
- type Check
- func CLIInBin() Check
- func ConnectivityCheck(urls []string) Check
- func DefaultConnectivityCheck() Check
- func DefaultKernelVersionCheck() Check
- func DefaultMinimumDiskCheck(c *dc.AutomateConfig) Check
- func DefaultMinimumRAMCheck() Check
- func DefaultPortCheck(skipShared bool, config *dc.AutomateConfig) (Check, error)
- func DefaultSysctlCheck() Check
- func HasCmdCheck(cmdName string) Check
- func HasNobodyCheck() Check
- func HasUserCheck(username string) Check
- func HasUseraddCheck() Check
- func IsA2DeployedCheck(portCheck *Check) Check
- func IsSystemdCheck() Check
- func KernelVersionCheck(minimumVersion proc.KernelVersion) Check
- func MinimumDiskCheck(minimumBytes uint64) Check
- func MinimumRAMCheck(kiloBytesMinimum int) Check
- func PortCheck(portsToCheck []int) Check
- func RootUserRequiredCheck() Check
- func SELinuxPermissiveCheck() Check
- type ConsoleReporter
- type DeployPreflightCheckOptions
- type DeployPreflightChecker
- type InMemoryPrintReporter
- type Reporter
- type SysctlCheck
- type TCPInfo
- type TCPState
- type TestProbe
Constants ¶
View Source
const GB = 1 << 30
Variables ¶
View Source
var TCPState_name = map[TCPState]string{ TCPStateEstablished: "ESTABLISHED", TCPStateSynSent: "SYN_SENT", TCPStateSynRecv: "SYN_RECV", TCPStateFinWait1: "FIN_WAIT1", TCPStateFinWait2: "FIN_WAIT2", TCPStateTimeWait: "TIME_WAIT", TCPStateClose: "CLOSE", TCPStateCloseWait: "CLOSE_WAIT", TCPStateLastAck: "LAST_ACK", TCPStateListen: "LISTEN", TCPStateClosing: "CLOSING", TCPStateUnknown: "UNKNOWN", }
Functions ¶
func RunDeployPreflightCheck ¶
func RunDeployPreflightCheck(opts DeployPreflightCheckOptions) (string, error)
RunDeployPreflightCheck runs the Deploy preflight checks
Types ¶
type Check ¶
func ConnectivityCheck ¶
func DefaultConnectivityCheck ¶
func DefaultConnectivityCheck() Check
func DefaultKernelVersionCheck ¶
func DefaultKernelVersionCheck() Check
func DefaultMinimumDiskCheck ¶
func DefaultMinimumDiskCheck(c *dc.AutomateConfig) Check
func DefaultMinimumRAMCheck ¶
func DefaultMinimumRAMCheck() Check
func DefaultPortCheck ¶
func DefaultPortCheck(skipShared bool, config *dc.AutomateConfig) (Check, error)
func DefaultSysctlCheck ¶
func DefaultSysctlCheck() Check
func HasCmdCheck ¶
func HasNobodyCheck ¶
func HasNobodyCheck() Check
func HasUserCheck ¶
func HasUseraddCheck ¶
func HasUseraddCheck() Check
func IsA2DeployedCheck ¶
func IsSystemdCheck ¶
func IsSystemdCheck() Check
func KernelVersionCheck ¶
func KernelVersionCheck(minimumVersion proc.KernelVersion) Check
func MinimumDiskCheck ¶
func MinimumRAMCheck ¶
func RootUserRequiredCheck ¶
func RootUserRequiredCheck() Check
func SELinuxPermissiveCheck ¶
func SELinuxPermissiveCheck() Check
type ConsoleReporter ¶
type ConsoleReporter struct {
// contains filtered or unexported fields
}
func NewConsoleReporter ¶
func NewConsoleReporter() *ConsoleReporter
func (*ConsoleReporter) HasFailures ¶
func (r *ConsoleReporter) HasFailures() bool
func (*ConsoleReporter) PrintSummaries ¶
func (c *ConsoleReporter) PrintSummaries()
func (*ConsoleReporter) ReportFailure ¶
func (r *ConsoleReporter) ReportFailure(msg string)
func (*ConsoleReporter) ReportSuccess ¶
func (*ConsoleReporter) ReportSuccess(msg string)
func (*ConsoleReporter) ReportSummary ¶
func (r *ConsoleReporter) ReportSummary(msg string)
type DeployPreflightCheckOptions ¶
type DeployPreflightCheckOptions struct { SkipA2DeployedCheck bool Airgap bool AutomateConfig *dc.AutomateConfig }
type DeployPreflightChecker ¶
type DeployPreflightChecker struct {
// contains filtered or unexported fields
}
func NewDeployPreflightChecker ¶
func NewDeployPreflightChecker(opts DeployPreflightCheckOptions) *DeployPreflightChecker
func (*DeployPreflightChecker) Run ¶
func (c *DeployPreflightChecker) Run(probe TestProbe) error
type InMemoryPrintReporter ¶
type InMemoryPrintReporter struct {
// contains filtered or unexported fields
}
func NewInMemoryPrintReporter ¶
func NewInMemoryPrintReporter() *InMemoryPrintReporter
func (*InMemoryPrintReporter) HasFailures ¶
func (r *InMemoryPrintReporter) HasFailures() bool
func (*InMemoryPrintReporter) Out ¶
func (r *InMemoryPrintReporter) Out() string
func (*InMemoryPrintReporter) ReportFailure ¶
func (r *InMemoryPrintReporter) ReportFailure(msg string)
func (*InMemoryPrintReporter) ReportSuccess ¶
func (r *InMemoryPrintReporter) ReportSuccess(msg string)
func (*InMemoryPrintReporter) ReportSummary ¶
func (r *InMemoryPrintReporter) ReportSummary(msg string)
type SysctlCheck ¶
func (SysctlCheck) IsRange ¶
func (s SysctlCheck) IsRange() bool
func (SysctlCheck) IsValid ¶
func (s SysctlCheck) IsValid(val uint64) bool
func (SysctlCheck) SysctlString ¶
func (s SysctlCheck) SysctlString() string
type TCPState ¶
type TCPState int
const ( TCPStateEstablished TCPState = 1 TCPStateSynSent TCPState = 2 TCPStateSynRecv TCPState = 3 TCPStateFinWait1 TCPState = 4 TCPStateFinWait2 TCPState = 5 TCPStateTimeWait TCPState = 6 TCPStateClose TCPState = 7 TCPStateCloseWait TCPState = 8 TCPStateLastAck TCPState = 9 TCPStateListen TCPState = 10 TCPStateClosing TCPState = 11 TCPStateUnknown TCPState = 12 )
type TestProbe ¶
type TestProbe interface { Reporter File(filePath string) ([]byte, error) IsSymlink(filePath string) (bool, error) Euid() int AvailableDiskSpace(path string) (uint64, error) LookupUser(username string) (*user.User, error) LookPath(file string) (string, error) HTTPConnectivity(url string) error SELinuxStatus() ([]byte, error) }
func NewTestProbe ¶
Click to show internal directories.
Click to hide internal directories.