MCPcopy
hub / github.com/grafana/grafana / Check

Interface Check

apps/advisor/pkg/app/checks/ifaces.go:14–28  ·  view source on GitHub ↗

Check returns metadata about the check being executed and the list of Steps

Source from the content-addressed store, hash-verified

12
13// Check returns metadata about the check being executed and the list of Steps
14type Check interface {
15 // ID returns the unique identifier of the check
16 ID() string
17 // Name returns the human-readable name of the check
18 Name() string
19 // Item returns the item that will be checked
20 Item(ctx context.Context, id string) (any, error)
21 // Items returns the list of items that will be checked
22 Items(ctx context.Context) ([]any, error)
23 // Steps returns the list of steps that will be executed
24 Steps() []Step
25 // Init initializes the check. It's called before running the steps and should be idempotent.
26 // The result should not be cached, it should be initialized from scratch.
27 Init(ctx context.Context) error
28}
29
30// Step is a single step in a check, including its metadata
31type Step interface {

Callers 30

loadCueFilesFunction · 0.65
readDirMethod · 0.65
runMigrationTestsFunction · 0.65
processCheckRetryFunction · 0.65
TestCheck_ItemFunction · 0.65
KeysMethod · 0.65

Implementers 7

mockCheckapps/advisor/pkg/app/utils_test.go
checkapps/advisor/pkg/app/checks/pluginchec
checkapps/advisor/pkg/app/checks/authchecks
checkapps/advisor/pkg/app/checks/configchec
checkapps/advisor/pkg/app/checks/datasource
checkapps/advisor/pkg/app/checks/instancech
mockCheckapps/advisor/pkg/app/checktyperegister

Calls

no outgoing calls

Tested by

no test coverage detected