monitoring

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheck

type HealthCheck struct {
	Name         string
	Description  string
	Check        func(context.Context) error
	Interval     time.Duration
	Timeout      time.Duration
	Dependencies []string
	Critical     bool
}

type HealthMonitor

type HealthMonitor struct {
	// contains filtered or unexported fields
}

func NewHealthMonitor

func NewHealthMonitor(
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
	interval time.Duration,
) *HealthMonitor

func (*HealthMonitor) RegisterCheck

func (hm *HealthMonitor) RegisterCheck(check HealthCheck) error

func (*HealthMonitor) Start

func (hm *HealthMonitor) Start(ctx context.Context) error

func (*HealthMonitor) Stop

func (hm *HealthMonitor) Stop()

type HealthStatus

type HealthStatus struct {
	Status    Status
	LastCheck time.Time
	LastError error
	Metadata  map[string]interface{}
	Duration  time.Duration
}

type Status

type Status string
const (
	StatusHealthy   Status = "HEALTHY"
	StatusDegraded  Status = "DEGRADED"
	StatusUnhealthy Status = "UNHEALTHY"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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