check

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package check validates a token via HTTP or a shell command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check(ctx context.Context, token string) Result
}

Checker validates a token value.

func New

func New(c config.Check, proxy string) (Checker, error)

New builds a Checker from config. proxy applies to http checks only.

type Result

type Result struct {
	OK      bool
	Latency time.Duration
	Status  int // HTTP status, 0 for command checks
	Err     error
}

Result is the outcome of a single check.

Jump to

Keyboard shortcuts

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