healthcheck

package
v0.11.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPathsToCheckPermission   = []string{filepath.Join(folderutil.HomeDirOrDefault(""), ".config", fileutil.ExecutableName())}
	DefaultHostsToCheckConnectivity = []string{"scanme.sh"}
	DefaultResolver                 = "1.1.1.1:53"
)

Functions

This section is empty.

Types

type ConnectionInfo

type ConnectionInfo struct {
	Host       string
	Successful bool
	Message    string
	Error      error
}

func CheckConnection

func CheckConnection(host string, port int, protocol string, timeout time.Duration) ConnectionInfo

type DnsResolveInfo

type DnsResolveInfo struct {
	Host        string
	Resolver    string
	Successful  bool
	IPAddresses []net.IPAddr
	Error       error
}

func DnsResolve

func DnsResolve(host string, resolver string) DnsResolveInfo

type EnvironmentInfo

type EnvironmentInfo struct {
	ExternalIPv4   string
	Admin          bool
	Arch           string
	Compiler       string
	GoVersion      string
	OSName         string
	ProgramVersion string
	OutboundIPv4   string
	OutboundIPv6   string
	Ulimit         Ulimit
	PathEnvVar     string
	Error          error
}

func CollectEnvironmentInfo

func CollectEnvironmentInfo(appVersion string) EnvironmentInfo

type HealthCheckInfo

type HealthCheckInfo struct {
	EnvironmentInfo EnvironmentInfo
	PathPermissions []PathPermission
	DnsResolveInfos []DnsResolveInfo
}

func Do

func Do(programVersion string, options *Options) (healthCheckInfo HealthCheckInfo)

type Options

type Options struct {
	Paths    []string
	Hosts    []string
	Resolver string
}

type PathPermission

type PathPermission struct {
	Error error
	// contains filtered or unexported fields
}

func CheckPathPermission

func CheckPathPermission(path string) (pathPermission PathPermission)

CheckPathPermission checks the permissions of the given file or directory.

type Ulimit

type Ulimit struct {
	Current uint64
	Max     uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL