Documentation
¶
Index ¶
- Variables
- func AgentHostLimit() int
- type Edition
- type IncidentManager
- type MaintenanceScheduler
- type MultiHostAgent
- type NoopEntityRouter
- type NoopEscalator
- func (NoopEscalator) EvaluateCycle(_ context.Context) error
- func (NoopEscalator) OnAlertAcknowledged(_ context.Context, _ string, _ alert.Acknowledgment) error
- func (NoopEscalator) OnAlertCreated(_ context.Context, _ *alert.Alert) error
- func (NoopEscalator) OnAlertResolved(_ context.Context, _ string, _ time.Time) error
- func (NoopEscalator) OnEditionDowngraded(_ context.Context) error
- type NoopIncidentManager
- type NoopMaintenanceScheduler
- type NoopMaintenanceSuppressor
- type NoopMultiHostAgent
- type NoopSubscriberNotifier
- type StatusIncident
- type StatusIncidentUpdate
- type StatusMaintenanceWindow
- type SubscriberNotifier
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.
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) OnAlertResolved ¶ added in v1.2.12
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) 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) ListUpcoming(_ context.Context) ([]StatusMaintenanceWindow, error)
type NoopMaintenanceSuppressor ¶
type NoopMaintenanceSuppressor struct{}
NoopMaintenanceSuppressor is the CE default. Implements alert.MaintenanceSuppressor.
func (NoopMaintenanceSuppressor) IsSuppressed ¶
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.
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 ¶
StatusIncidentUpdate is a timestamped entry in an incident timeline.