manager

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 16 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,
	notifier kit.Notifier,
	routes notify.ReceiverRoutes,
	historyStore history.Recorder,
	metricsReg *metrics.Registry,
	logger *slog.Logger,
) (*Manager, error)

NewManager builds a Manager from config.

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, routes notify.ReceiverRoutes) (ReloadResult, error)

Reload rebuilds heartbeat runners and receiver routes.

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