checks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandCheck

type CommandCheck struct {
	Command string
}

func (*CommandCheck) Execute

func (c *CommandCheck) Execute(_ context.Context) error

type DirectoryCheck

type DirectoryCheck struct {
	Folder string
}

func (*DirectoryCheck) Execute

func (d *DirectoryCheck) Execute(_ context.Context) error

type EnvCheck

type EnvCheck struct {
	Key    string
	EnvMap map[string]string
}

func (*EnvCheck) Execute

func (e *EnvCheck) Execute(_ context.Context) error

type FileCheck

type FileCheck struct {
	Path string
}

func (*FileCheck) Execute

func (f *FileCheck) Execute(_ context.Context) error

Execute uses os.Stat (follows symlinks) to confirm the path exists and is a file. A symlink pointing to a file passes; a broken symlink or a path that resolves to a directory fails. File contents are never read.

type HttpReachableCheck

type HttpReachableCheck struct {
	Address string
	Timeout time.Duration
}

func (*HttpReachableCheck) Execute

func (h *HttpReachableCheck) Execute(ctx context.Context) error

type PortFreeCheck

type PortFreeCheck struct {
	Port string
}

func (*PortFreeCheck) Execute

func (p *PortFreeCheck) Execute(_ context.Context) error

Execute binds 127.0.0.1:<port> to verify it is free. It only tests the loopback interface — a service listening exclusively on a non-loopback interface (e.g. 0.0.0.0) may still be reported as free by this check.

type TcpReachableCheck

type TcpReachableCheck struct {
	Address string
	Timeout time.Duration
}

func (*TcpReachableCheck) Execute

func (t *TcpReachableCheck) Execute(ctx context.Context) error

Jump to

Keyboard shortcuts

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