health

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package health provides health check functionality for the flightctl-agent. Used by greenboot to verify agent health during boot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChecker

func NewChecker(log *log.PrefixLogger, opts ...Option) *checker

NewChecker creates a new health checker with the given options.

Types

type Option

type Option func(*checker)

Option is a functional option for configuring the checker.

func WithOutput

func WithOutput(w io.Writer) Option

WithOutput sets the output writer for messages.

func WithStabilityWindow

func WithStabilityWindow(d time.Duration) Option

WithStabilityWindow sets the duration the service must remain stable.

func WithSystemdClient

func WithSystemdClient(systemd *client.Systemd) Option

WithSystemdClient sets a custom systemd client (for testing).

func WithTimeout

func WithTimeout(t time.Duration) Option

WithTimeout sets the timeout for waiting for the service to become active.

func WithVerbose

func WithVerbose(v bool) Option

WithVerbose enables verbose output.

Jump to

Keyboard shortcuts

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