Documentation
¶
Overview ¶
Package httptypes contains types that are serialized in HTTP request bodies or responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateJobTypeRequest ¶
type CreateJobTypeRequest struct { Name string `json:"name"` Attempts int16 `json:"attempts"` Concurrency int16 `json:"concurrency"` // Should match the values in the newmodels.DeliveryStrategy enum // - "at_most_once" or "at_least_once" DeliveryStrategy string `json:"delivery_strategy"` }
CreateJobTypeRequest contains data sent in the body of a request to create a job type.
type EnqueueJobRequest ¶
type EnqueueJobRequest struct { // Job data to enqueue. Data json.RawMessage `json:"data"` // The earliest time we can run this job. If not specified, defaults to the // current time. RunAfter types.NullTime `json:"run_after"` // The latest time we can run this job. If not specified, defaults to null // (never expires). ExpiresAt types.NullTime `json:"expires_at"` }
An EnqueueJobRequest is sent in the body of a request to PUT /v1/jobs/:job-name/:job-id.
type JobStatusRequest ¶
type JobStatusRequest struct { // Should match one of the values in newmodels.ArchivedJobStatus // ("succeeded" or "failed"). Status string `json:"status"` // Attempt is sent to ensure we don't attempt a null write. Attempt *int16 `json:"attempt"` // pointer to distinguish between null/omitted value and 0. // Retryable indicates whether a failure is retryable. The default is true. // Set to false to avoid retrying a particular failure. Retryable *bool `json:"retryable"` // pointer to distinguish between null value and false. }
The body of a POST request to /v1/jobs/:job-name/:job-id, recording the status of a job.
Click to show internal directories.
Click to hide internal directories.