extension

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentEdition = func() Edition { return Community }

CurrentEdition returns the edition of the running binary. CE always returns Community. Extended editions override this via the build.

View Source
var ErrNotAvailable = errors.New("this feature requires an extended edition of maintenant")

ErrNotAvailable is returned by no-op implementations when an extension is not available.

Functions

func AgentHostLimit added in v1.3.0

func AgentHostLimit() int

AgentHostLimit returns the maximum number of enrolled agent hosts (local runtime excluded) for the running edition: -1 means unlimited, 0 means none. Community cannot enroll agents (multi-host is Pro-only); Pro is capped.

Types

type Edition

type Edition string

Edition identifies whether the running binary is Community or Pro.

const (
	Community Edition = "community"
	Pro       Edition = "pro"
)

type IncidentManager

type IncidentManager interface {
	HandleAlertEvent(ctx context.Context, evt alert.Event) error
	ListActiveIncidents(ctx context.Context) ([]StatusIncident, error)
	ListRecentIncidents(ctx context.Context, limit int) ([]StatusIncident, error)
}

IncidentManager handles incident lifecycle on the status page. CE: no-op. Pro: full incident CRUD + auto-incident from alerts.

type MaintenanceScheduler

type MaintenanceScheduler interface {
	Start(ctx context.Context) error
	ListUpcoming(ctx context.Context) ([]StatusMaintenanceWindow, error)
}

MaintenanceScheduler manages scheduled maintenance windows on the status page. CE: no-op. Pro: auto-activate/deactivate windows, create incidents, notify subscribers.

type MultiHostAgent added in v1.3.0

type MultiHostAgent interface {
	StartServer(ctx context.Context) error
	StartAgent(ctx context.Context) error
	Stop() error
}

MultiHostAgent is the interface for the optional multi-host server/agent extension. CE uses NoopMultiHostAgent. Pro overrides via build injection.

type NoopEntityRouter

type NoopEntityRouter struct{}

NoopEntityRouter is the CE default. Implements alert.EntityRouter.

func (NoopEntityRouter) Route

type NoopEscalator

type NoopEscalator struct{}

NoopEscalator is the CE default. Implements alert.Escalator.

func (NoopEscalator) EvaluateCycle added in v1.2.12

func (NoopEscalator) EvaluateCycle(_ context.Context) error

func (NoopEscalator) OnAlertAcknowledged added in v1.2.12

func (NoopEscalator) OnAlertAcknowledged(_ context.Context, _ string, _ alert.Acknowledgment) error

func (NoopEscalator) OnAlertCreated added in v1.2.12

func (NoopEscalator) OnAlertCreated(_ context.Context, _ *alert.Alert) error

func (NoopEscalator) OnAlertResolved added in v1.2.12

func (NoopEscalator) OnAlertResolved(_ context.Context, _ string, _ time.Time) error

func (NoopEscalator) OnEditionDowngraded added in v1.2.12

func (NoopEscalator) OnEditionDowngraded(_ context.Context) error

type NoopIncidentManager

type NoopIncidentManager struct{}

NoopIncidentManager is the CE default.

func (NoopIncidentManager) HandleAlertEvent

func (NoopIncidentManager) HandleAlertEvent(_ context.Context, _ alert.Event) error

func (NoopIncidentManager) ListActiveIncidents

func (NoopIncidentManager) ListActiveIncidents(_ context.Context) ([]StatusIncident, error)

func (NoopIncidentManager) ListRecentIncidents

func (NoopIncidentManager) ListRecentIncidents(_ context.Context, _ int) ([]StatusIncident, error)

type NoopMaintenanceScheduler

type NoopMaintenanceScheduler struct{}

NoopMaintenanceScheduler is the CE default.

func (NoopMaintenanceScheduler) ListUpcoming

func (NoopMaintenanceScheduler) Start

type NoopMaintenanceSuppressor

type NoopMaintenanceSuppressor struct{}

NoopMaintenanceSuppressor is the CE default. Implements alert.MaintenanceSuppressor.

func (NoopMaintenanceSuppressor) IsSuppressed

func (NoopMaintenanceSuppressor) IsSuppressed(_ context.Context, _ string, _ string, _ string) (bool, error)

type NoopMultiHostAgent added in v1.3.0

type NoopMultiHostAgent struct{}

NoopMultiHostAgent is the CE default — returns ErrNotAvailable for server/agent modes.

func (NoopMultiHostAgent) StartAgent added in v1.3.0

func (NoopMultiHostAgent) StartAgent(_ context.Context) error

func (NoopMultiHostAgent) StartServer added in v1.3.0

func (NoopMultiHostAgent) StartServer(_ context.Context) error

func (NoopMultiHostAgent) Stop added in v1.3.0

func (NoopMultiHostAgent) Stop() error

type NoopSubscriberNotifier

type NoopSubscriberNotifier struct{}

NoopSubscriberNotifier is the CE default.

func (NoopSubscriberNotifier) NotifyAll

type StatusIncident

type StatusIncident struct {
	ID        int64
	Title     string
	Severity  string
	Status    string
	CreatedAt time.Time
	Updates   []StatusIncidentUpdate
}

StatusIncident is a minimal representation for the status page API response.

type StatusIncidentUpdate

type StatusIncidentUpdate struct {
	Status    string
	Message   string
	CreatedAt time.Time
}

StatusIncidentUpdate is a timestamped entry in an incident timeline.

type StatusMaintenanceWindow

type StatusMaintenanceWindow struct {
	ID          int64
	Title       string
	Description string
	StartsAt    time.Time
	EndsAt      time.Time
	Active      bool
}

StatusMaintenanceWindow is a minimal representation for the status page API response.

type SubscriberNotifier

type SubscriberNotifier interface {
	NotifyAll(ctx context.Context, subject string, htmlBody string) error
}

SubscriberNotifier sends email notifications to status page subscribers. CE: no-op. Pro: SMTP delivery.

Jump to

Keyboard shortcuts

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