services

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthChecker

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

func NewHealthChecker

func NewHealthChecker(store *store.Store, docker *docker.Client, dataDir, backupDir string, masterKey []byte) *HealthChecker

func (*HealthChecker) CloseInstanceConnections

func (hc *HealthChecker) CloseInstanceConnections(instanceName string)

CloseInstanceConnections closes the cached connection for a specific instance. Called when an instance is stopped, destroyed, or about to be reconfigured.

func (*HealthChecker) ResetInProgressRecords

func (hc *HealthChecker) ResetInProgressRecords() error

ResetInProgressRecords resets any stuck in_progress records on startup

func (*HealthChecker) RunHealthCheck

func (hc *HealthChecker) RunHealthCheck(ctx context.Context) error

RunHealthCheck performs a complete health check cycle

type HealthNotificationEvaluator

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

HealthNotificationEvaluator evaluates health records and determines if notifications should be sent

func NewHealthNotificationEvaluator

func NewHealthNotificationEvaluator(store *store.Store) *HealthNotificationEvaluator

func (*HealthNotificationEvaluator) EvaluateAndNotify

func (e *HealthNotificationEvaluator) EvaluateAndNotify(ctx context.Context) error

EvaluateAndNotify checks if notification thresholds are met and sends notifications if needed

type HostCheckResult

type HostCheckResult struct {
	DockerOK    bool
	DiskSpaceOK bool
	CPUOK       bool
	FailMsg     string
}

type InstanceHealthResult

type InstanceHealthResult struct {
	HealthyInstances []string
	BrokenInstances  []string
	FailMsg          string
}

type NotificationSender

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

func NewNotificationSender

func NewNotificationSender(notifStore *notifications.NotificationStore, kvstore *store.Store) *NotificationSender

func (*NotificationSender) Send

func (s *NotificationSender) Send(ctx context.Context, name, subject, body string) error

func (*NotificationSender) SendToAll

func (s *NotificationSender) SendToAll(ctx context.Context, subject, body string) error

func (*NotificationSender) Test

func (s *NotificationSender) Test(ctx context.Context) error

type NotificationState

type NotificationState int

NotificationState represents the current notification state

const (
	StateUnknown NotificationState = iota
	StateHealthy
	StateDegraded
)

func (NotificationState) String

func (s NotificationState) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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