checks

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareAll

func PrepareAll(cmd *exec.Cmd, chks []Interface) error

Types

type Interface

type Interface interface {
	Spec() string
	Prepare(*exec.Cmd) error
	Collect(*exec.Cmd) ([]byte, error)
	Format([]byte) ([]string, error)
}
var (
	ExitCode Interface = exitCode{}
	Stdout   Interface = stdout{}
	Stderr   Interface = stderr{}
)

func Parse

func Parse(line string) Interface

It maybe better to: 1. Follow the kubernetes style of `name: {}` or.. 2. Uses polymorphic YAML or... 3. Writes a proper parser

type Result

type Result struct {
	Check Interface
	Data  []byte
}

func CollectAll

func CollectAll(cmd *exec.Cmd, chks []Interface) ([]Result, error)

Jump to

Keyboard shortcuts

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