httpapi

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(
	cfg *config.Config,
	db *postgres.DB,
	tenantRepo *postgres.TenantRepo,
	jobRepo *postgres.JobRepo,
	scheduleRepo *postgres.ScheduleRepo,
	workerRepo *postgres.WorkerRepo,
	metrics *observability.Metrics,
) *API

func (*API) Routes

func (a *API) Routes() http.Handler

type BatchEnqueueRequest

type BatchEnqueueRequest struct {
	Jobs []EnqueueRequest `json:"jobs"`
}

BatchEnqueueRequest is the body of POST /v1/jobs/batch.

type CreateScheduleRequest

type CreateScheduleRequest struct {
	Name           string          `json:"name"`
	Queue          string          `json:"queue"`
	TaskType       string          `json:"task_type"`
	Payload        json.RawMessage `json:"payload"`
	CronExpression string          `json:"cron_expression"`
	Timezone       string          `json:"timezone"`
	Priority       *int16          `json:"priority"`
	MaxAttempts    *int            `json:"max_attempts"`
	TimeoutSeconds *int            `json:"timeout_seconds"`
	MisfirePolicy  string          `json:"misfire_policy"`
}

type EnqueueRequest

type EnqueueRequest struct {
	TaskType       string          `json:"task_type"`
	Queue          string          `json:"queue"`
	Payload        json.RawMessage `json:"payload"`
	Priority       *int16          `json:"priority"`
	RunAt          *time.Time      `json:"run_at"`
	MaxAttempts    *int            `json:"max_attempts"`
	TimeoutSeconds *int            `json:"timeout_seconds"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL