handler

package
v0.0.0-...-a0c049e Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTaskRequest

type CreateTaskRequest struct {
	ID string `json:"id"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type HealthHandler

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

func NewHealthHandler

func NewHealthHandler(taskManager *service.TaskManager) *HealthHandler

func (*HealthHandler) Health

func (h *HealthHandler) Health(w http.ResponseWriter, r *http.Request)

type HealthMetrics

type HealthMetrics struct {
	ActiveWorkers  int `json:"active_workers"`
	TotalTasks     int `json:"total_tasks"`
	PendingTasks   int `json:"pending_tasks"`
	RunningTasks   int `json:"running_tasks"`
	CompletedTasks int `json:"completed_tasks"`
	FailedTasks    int `json:"failed_tasks"`
}

type HealthResponse

type HealthResponse struct {
	Status    string            `json:"status"`
	Timestamp time.Time         `json:"timestamp"`
	Uptime    string            `json:"uptime"`
	Service   string            `json:"service"`
	Version   string            `json:"version"`
	Metrics   HealthMetrics     `json:"metrics"`
	Checks    map[string]string `json:"checks"`
}

type TaskHandler

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

func NewTaskHandler

func NewTaskHandler(taskManager *service.TaskManager) *TaskHandler

func (*TaskHandler) CreateTask

func (h *TaskHandler) CreateTask(w http.ResponseWriter, r *http.Request)

func (*TaskHandler) DeleteTask

func (h *TaskHandler) DeleteTask(w http.ResponseWriter, r *http.Request)

func (*TaskHandler) GetTask

func (h *TaskHandler) GetTask(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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