checks

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 18 Imported by: ? 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 NetworkCheckerInstance = &NetworkChecker{}
View Source
var VMCheckerInstance = &VMChecker{}

Functions

func IsHealthy

func IsHealthy(checks []HealthCheck) bool

Types

type CheckData

type CheckData struct {
	Twin     uint32
	Contract uint64
	Workload gridtypes.Workload
	VM       func(ctx context.Context, id string) bool
	Network  func(ctx context.Context, id zos.NetID) string
}

type Checker

type Checker interface {
	Name() string
	Run(ctx context.Context, data *CheckData) []HealthCheck
}

type HealthCheck

type HealthCheck struct {
	Name     string                 `json:"name"`
	OK       bool                   `json:"ok"`
	Message  string                 `json:"message,omitempty"`
	Evidence map[string]interface{} `json:"evidence,omitempty"`
}

func Run

func Run(ctx context.Context, workloadType gridtypes.WorkloadType, data *CheckData) []HealthCheck

type NetworkChecker

type NetworkChecker struct {
	// contains filtered or unexported fields
}

func (*NetworkChecker) Name

func (nc *NetworkChecker) Name() string

func (*NetworkChecker) Run

func (nc *NetworkChecker) Run(ctx context.Context, data *CheckData) []HealthCheck

type SystemChecker

type SystemChecker struct {
	// contains filtered or unexported fields
}

func NewSystemChecker

func NewSystemChecker(command string) *SystemChecker

func (*SystemChecker) Name

func (sc *SystemChecker) Name() string

func (*SystemChecker) Run

func (sc *SystemChecker) Run(ctx context.Context, data *CheckData) []HealthCheck

type VMChecker

type VMChecker struct {
	// contains filtered or unexported fields
}

func (*VMChecker) Name

func (vc *VMChecker) Name() string

func (*VMChecker) Run

func (vc *VMChecker) Run(ctx context.Context, data *CheckData) []HealthCheck

Jump to

Keyboard shortcuts

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