Documentation
¶
Index ¶
- Constants
- Variables
- func IsInvalidJobsQuery(err error) bool
- func IsUnsupportedNotificationName(err error) bool
- type ConfiguredSystemDestinationResponse
- type DiagnosticCheck
- type DiagnosticsResponse
- type HealthResponse
- type JobDetail
- type JobListItem
- type JobSummary
- type JobsListResponse
- type JobsQuery
- type NotificationHealth
- type Pagination
- type ProviderStatus
- type QueueSummary
- type SanitizedAttemptError
- type ScheduleHealth
- type Service
- func (s *Service) Diagnostics(ctx context.Context, rawName string) (DiagnosticsResponse, error)
- func (s *Service) Health(ctx context.Context) (HealthResponse, error)
- func (s *Service) Job(ctx context.Context, id int64) (JobDetail, bool, error)
- func (s *Service) Jobs(ctx context.Context, query JobsQuery) (JobsListResponse, error)
- type SubscriberCounts
- type TroubleshootingWarning
- type WorkerHealth
Constants ¶
View Source
const ( ProviderStaleThresholdSeconds = 600 SourceStaleThresholdSeconds = 1800 StatusPass = "pass" StatusWarning = "warning" StatusFail = "fail" )
Variables ¶
View Source
var ( ErrInvalidJobsQuery = errors.New("invalid notification troubleshooting jobs query") ErrUnsupportedNotificationName = errors.New("unsupported notification name") )
Functions ¶
func IsInvalidJobsQuery ¶
Types ¶
type DiagnosticCheck ¶
type DiagnosticsResponse ¶
type DiagnosticsResponse struct {
NotificationName string `json:"notificationName"`
Status string `json:"status"`
Checks []DiagnosticCheck `json:"checks"`
RecommendedActions []string `json:"recommendedActions"`
SubscriberCounts SubscriberCounts `json:"subscriberCounts"`
ConfiguredDestinations []ConfiguredSystemDestinationResponse `json:"configuredDestinations"`
}
type HealthResponse ¶
type HealthResponse struct {
Worker WorkerHealth `json:"worker"`
Providers []ProviderStatus `json:"providers"`
Notifications []NotificationHealth `json:"notifications"`
Schedules []ScheduleHealth `json:"schedules"`
Warnings []TroubleshootingWarning `json:"warnings"`
}
type JobDetail ¶
type JobDetail struct {
JobListItem
Metadata map[string]string `json:"metadata"`
Args map[string]any `json:"args"`
Errors []SanitizedAttemptError `json:"errors"`
}
type JobListItem ¶
type JobListItem struct {
ID int64 `json:"id"`
State string `json:"state"`
Queue string `json:"queue"`
Kind string `json:"kind"`
Attempt int `json:"attempt"`
MaxAttempts int `json:"maxAttempts"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
ScheduledAt time.Time `json:"scheduledAt" format:"date-time"`
AttemptedAt *time.Time `json:"attemptedAt" format:"date-time"`
FinalizedAt *time.Time `json:"finalizedAt" format:"date-time"`
NotificationKind string `json:"notificationKind,omitempty"`
Provider string `json:"provider,omitempty"`
Target string `json:"target,omitempty"`
CorrelationID string `json:"correlationId,omitempty"`
SourceJobKind string `json:"sourceJobKind,omitempty"`
SourceJobID string `json:"sourceJobId,omitempty"`
LastError *string `json:"lastError"`
Stale bool `json:"stale"`
}
type JobSummary ¶
type JobsListResponse ¶
type JobsListResponse struct {
Data []JobListItem `json:"data"`
Pagination Pagination `json:"pagination"`
}
type NotificationHealth ¶
type NotificationHealth struct {
Name string `json:"name"`
ConfiguredDestinations []ConfiguredSystemDestinationResponse `json:"configuredDestinations"`
SubscriberCounts SubscriberCounts `json:"subscriberCounts"`
Warnings []TroubleshootingWarning `json:"warnings"`
}
type Pagination ¶
type Pagination struct {
NextCursor string `json:"nextCursor,omitempty"`
}
type ProviderStatus ¶
type QueueSummary ¶
type QueueSummary struct {
Name string `json:"name"`
MaxWorkers int `json:"maxWorkers"`
Available int64 `json:"available"`
Retryable int64 `json:"retryable"`
Running int64 `json:"running"`
Scheduled int64 `json:"scheduled"`
Completed24h int64 `json:"completed24h"`
Discarded24h int64 `json:"discarded24h"`
OldestAvailableAt *time.Time `json:"oldestAvailableAt"`
StaleCount int64 `json:"staleCount"`
StaleThresholdSeconds int64 `json:"staleThresholdSeconds"`
}
type SanitizedAttemptError ¶
type ScheduleHealth ¶
type ScheduleHealth struct {
Name string `json:"name"`
JobKind string `json:"jobKind"`
DeliveryKind string `json:"deliveryKind,omitempty"`
Queue string `json:"queue"`
Enabled bool `json:"enabled"`
Schedule string `json:"schedule"`
NextRunAt *time.Time `json:"nextRunAt"`
LastJob *JobSummary `json:"lastJob,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Diagnostics ¶
type SubscriberCounts ¶
type TroubleshootingWarning ¶
type WorkerHealth ¶
type WorkerHealth struct {
Enabled bool `json:"enabled"`
Mode string `json:"mode"`
PollOnly bool `json:"pollOnly"`
Queues []QueueSummary `json:"queues"`
}
Click to show internal directories.
Click to hide internal directories.