Documentation
¶
Index ¶
- Variables
- type CategoryService
- type CategorySummary
- type ComponentWithSubStatusInfo
- type DailyUptimeBar
- type IncidentStatusInfo
- type IncidentsResponse
- type ResolvedServiceMetricsInput
- type Service
- func (s *Service) BuildCategorySummary(ctx context.Context, prefix string) (*CategorySummary, error)
- func (s *Service) BuildComponents(ctx context.Context, now time.Time) ([]ComponentWithSubStatusInfo, error)
- func (s *Service) BuildIncidents(ctx context.Context, now time.Time, startDate, endDate *time.Time) (*IncidentsResponse, error)
- func (s *Service) BuildServiceMetrics(ctx context.Context, serviceID primitive.ObjectID, now time.Time) (*ServiceMetrics, error)
- func (s *Service) BuildSummary(ctx context.Context, now time.Time) (*StatusSummary, error)
- type ServiceAvailabilityMetrics
- type ServiceLatencyMetrics
- type ServiceMetrics
- type ServiceMetricsHistoryEntry
- type StatusSummary
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCategoryNotFound = fmt.Errorf("category not found")
Functions ¶
This section is empty.
Types ¶
type CategoryService ¶
type CategoryService struct {
ID primitive.ObjectID `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Status models.ComponentStatus `json:"status"`
UpdatedAt time.Time `json:"updatedAt"`
Uptime30d *float64 `json:"uptime30d"`
UptimeHistory []DailyUptimeBar `json:"uptimeHistory"`
}
type CategorySummary ¶
type CategorySummary struct {
Prefix string `json:"prefix"`
Name string `json:"name"`
Description string `json:"description"`
AggregateStatus string `json:"aggregateStatus"`
HasMonitoring bool `json:"hasMonitoring"`
Uptime30d *float64 `json:"uptime30d"`
Services []CategoryService `json:"services"`
Incidents []models.IncidentWithUpdates `json:"incidents"`
}
type ComponentWithSubStatusInfo ¶
type ComponentWithSubStatusInfo struct {
models.Component
SubComponents []models.SubComponent `json:"subComponents"`
UptimeHistory []DailyUptimeBar `json:"uptimeHistory"`
LastIncident *IncidentStatusInfo `json:"lastIncident,omitempty"`
}
type DailyUptimeBar ¶
type IncidentStatusInfo ¶
type IncidentsResponse ¶
type IncidentsResponse struct {
Active []models.IncidentWithUpdates `json:"active"`
Resolved []models.IncidentWithUpdates `json:"resolved"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo repository.StatusRepository) *Service
func (*Service) BuildCategorySummary ¶
func (*Service) BuildComponents ¶
func (*Service) BuildIncidents ¶
func (*Service) BuildServiceMetrics ¶
func (*Service) BuildSummary ¶
type ServiceAvailabilityMetrics ¶
type ServiceAvailabilityMetrics struct {
Last30Days float64 `json:"last30Days"`
}
type ServiceLatencyMetrics ¶
type ServiceMetrics ¶
type ServiceMetrics struct {
Latency *ServiceLatencyMetrics `json:"latency,omitempty"`
Availability *ServiceAvailabilityMetrics `json:"availability,omitempty"`
History []ServiceMetricsHistoryEntry `json:"history"`
}
type ServiceMetricsHistoryEntry ¶
type ServiceMetricsHistoryEntry struct {
Month string `json:"month"`
Latency ServiceLatencyMetrics `json:"latency"`
Availability float64 `json:"availability"`
}
Click to show internal directories.
Click to hide internal directories.