check

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package check contains the code to parse the check command output

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	Metrics []Metric `json:"metrics"`
}

Aggregator contains the metrics emitted by a check

type Metric

type Metric struct {
	Host           string      `json:"host"`
	Interval       int         `json:"interval"`
	Metric         string      `json:"metric"`
	Points         [][]float64 `json:"points"`
	SourceTypeName string      `json:"source_type_name"`
	Tags           []string    `json:"tags"`
	Type           string      `json:"type"`
}

Metric represents a metric emitted by a check

type Root

type Root struct {
	Aggregator Aggregator `json:"aggregator"`
	Runner     Runner     `json:"runner"`
}

Root is the root object of the check command output

func ParseJSONOutput

func ParseJSONOutput(t *testing.T, check []byte) []Root

ParseJSONOutput parses the check command json output

type Runner added in v0.73.0

type Runner struct {
	TotalRuns     int `json:"TotalRuns"`
	TotalErrors   int `json:"TotalErrors"`
	TotalWarnings int `json:"TotalWarnings"`
}

Runner contains the check execution information

Jump to

Keyboard shortcuts

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