checks

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

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