Documentation
¶
Index ¶
Constants ¶
View Source
const ( DlqSuffix = "-dlq" // envs: LocalEnv = "local" ProEnv = "pro" // message statuses: ReadyStatus = 0 ProcessingStatus = 1 FailedStatus = 2 // OS: WindowsOS = "windows" LinuxOS = "linux" MacOS = "darwin" // reasons to move message to DLQ: MaxAttemptsReachedFailureReason = "max_attempts_reached" MessageExpiredFailureReason = "message_expired" )
View Source
const ( ErrCodeBadRequestContentExceedsLimit = "bad_request.body.content.exceeds_limit" ErrCodeBadRequestProcessAfterInPast = "bad_request.body.processAfter.in_past" ErrCodeBadRequestProcessAfterTooFar = "bad_request.body.processAfter.too_far" ErrCodeBadRequestInvalidBody = "bad_request.body.invalid" ErrCodeBadRequestDlqOnlyOp = "bad_request.dlq_only_operation" ErrCodeTooManyRequests = "too_many_requests" ErrCodeNotFoundMessage = "not_found.message" ErrCodeServiceUnhealthy = "forq.unhealthy" ErrCodeInternal = "internal" )
Variables ¶
View Source
var ( ErrBadRequestContentExceedsLimit = ForqError{Code: ErrCodeBadRequestContentExceedsLimit} ErrBadRequestProcessAfterInPast = ForqError{Code: ErrCodeBadRequestProcessAfterInPast} ErrBadRequestProcessAfterTooFar = ForqError{Code: ErrCodeBadRequestProcessAfterTooFar} ErrBadRequestDlqOnlyOp = ForqError{Code: ErrCodeBadRequestDlqOnlyOp} ErrNotFoundMessage = ForqError{Code: ErrCodeNotFoundMessage} ErrInternal = ForqError{Code: ErrCodeInternal} )
Functions ¶
This section is empty.
Types ¶
type DashboardPageData ¶
type DashboardPageData struct {
Title string
TotalQueues int
TotalMessages int
DLQMessages int
Queues []QueueStats
}
DashboardPageData contains data for the dashboard page
type ErrorResponse ¶
type ErrorResponse struct {
Code string `json:"code,omitempty"`
}
type LoginPageData ¶
LoginPageData contains data for the login page
type MessageDetails ¶
type MessageDetails struct {
ID string
Content string
Status string
Attempts int
ReceivedAt string
Age string
ProcessAfter string
ProcessingStartedAt string
FailureReason string
UpdatedAt string
}
MessageDetails represents detailed information about a message for UI display (full expansion)
type MessageMetadata ¶
MessageMetadata represents basic metadata about a message with the idea of saving memory and network by not including full content
type MessageResponse ¶
type MessagesComponentData ¶
type MessagesComponentData struct {
Messages []MessageMetadata
NextCursor string // Last message ID for cursor-based pagination
HasMore bool // Whether there are more messages to load
QueueName string // For HTMX URLs
IsDLQ bool // Whether this is a DLQ queue (for action buttons)
}
MessagesComponentData contains data for the messages component with cursor-based pagination
type NewMessageRequest ¶
type QueuePageData ¶
type QueuePageData struct {
Title string
Queue *QueueStats
}
QueuePageData contains data for individual queue pages (queue stats only, no messages)
type QueueStats ¶
QueueStats represents queue statistics for dashboard display
Click to show internal directories.
Click to hide internal directories.