registry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKnownType

func IsKnownType(checkType model.CheckType) bool

func Register

func Register(checkType model.CheckType, factory Factory)

Register is called by individual checks during application startup.

Types

type Check

type Check interface {
	Execute(ctx context.Context) error
}

Check is the strict contract that every diagnostic test must follow. The ctx carries cancellation — long-running checks (HTTP, TCP) must respect it.

func Build

func Build(cfg model.CheckConfig) (Check, error)

Build looks up the check type in the registry and constructs it.

type Factory

type Factory func(cfg model.CheckConfig) (Check, error)

Factory is a function that takes the user's config and returns an executable Check.

Jump to

Keyboard shortcuts

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