manager

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager owns the configured heartbeats and notification mailbox.

func NewManager

func NewManager(
	cfg *config.Config,
	templateFS fs.FS,
	notifier ntypes.Notifier,
	historyStore history.Recorder,
	metricsReg *metrics.Registry,
	logger *slog.Logger,
) (*Manager, error)

NewManager builds a Manager from config and templates.

func (*Manager) All

func (m *Manager) All() []*htypes.Heartbeat

All returns all configured heartbeats.

func (*Manager) Get

func (m *Manager) Get(id string) (*htypes.Heartbeat, bool)

Get returns a heartbeat by id.

func (*Manager) Reload

func (m *Manager) Reload(ctx context.Context, cfg *config.Config, templateFS fs.FS) (ReloadResult, error)

Reload rebuilds heartbeat runners and receiver registrations.

func (*Manager) StartAll

func (m *Manager) StartAll(ctx context.Context)

StartAll launches runner loops for all configured heartbeats.

func (*Manager) StopAll

func (m *Manager) StopAll()

StopAll stops all heartbeat runner loops.

type ReloadResult

type ReloadResult struct {
	Added   int
	Updated int
	Removed int
}

ReloadResult reports heartbeat changes after a reload.

Jump to

Keyboard shortcuts

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