Documentation
¶
Index ¶
Constants ¶
View Source
const ( BackoffBase = 5 * time.Second BackoffMax = 5 * time.Minute JitterRatio = 0.25 )
Variables ¶
This section is empty.
Functions ¶
func RetryDelay ¶
RetryDelay returns exponential backoff with jitter for the given attempt index.
Types ¶
type Message ¶
type Message struct {
ID string `json:"id"`
Type string `json:"type"`
Payload map[string]interface{} `json:"payload"`
Status jobs.Status `json:"status"`
Attempts int `json:"attempts"`
MaxRetries int `json:"max_retries"`
RunAt time.Time `json:"run_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LastError string `json:"last_error,omitempty"`
}
Message is the JSON envelope stored in broker-backed job queues.
Click to show internal directories.
Click to hide internal directories.