monitoring

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package monitoring pkg/monitoring/monitor.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor represents a generic monitoring system.

func NewMonitor

func NewMonitor(cfg MonitorConfig) *Monitor

NewMonitor creates a new monitoring system.

func (*Monitor) StartMonitoring

func (m *Monitor) StartMonitoring(ctx context.Context, check func(context.Context) error)

StartMonitoring starts monitoring in a background goroutine.

func (*Monitor) Stop

func (m *Monitor) Stop(_ context.Context)

Stop stops the monitoring.

type MonitorConfig

type MonitorConfig struct {
	Interval       time.Duration
	AlertThreshold time.Duration
}

MonitorConfig holds configuration for monitoring.

Jump to

Keyboard shortcuts

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