handlers

package
v0.0.0-...-f2dbe61 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

handlers.go implements HTTP request handlers for the job orchestration API Manages job registration, execution, and status reporting Provides RESTful interface to the orchestrator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler contains dependencies for HTTP request handling Encapsulates the orchestrator for job management operations

func NewHandler

func NewHandler(orch *orchestrator.Orchestrator) *Handler

NewHandler creates a new Handler instance Initializes with reference to orchestrator for job operations Used by routing setup to create handler instance

func (*Handler) HandleExecuteJob

func (h *Handler) HandleExecuteJob(w http.ResponseWriter, r *http.Request)

HandleExecuteJob processes requests to execute a job POST /jobs/{id}/execute Takes optional JSON body with execution data

func (*Handler) HandleGetJobState

func (h *Handler) HandleGetJobState(w http.ResponseWriter, r *http.Request)

HandleGetJobState processes requests to get job execution state GET /jobs/{id}/state Returns current state of job execution

func (*Handler) HandleGetSystemState

func (h *Handler) HandleGetSystemState(w http.ResponseWriter, r *http.Request)

HandleGetSystemState processes requests to get overall system state GET /system/state Returns state of all jobs and queue information

func (*Handler) HandleRegisterJobDefinition

func (h *Handler) HandleRegisterJobDefinition(w http.ResponseWriter, r *http.Request)

HandleRegisterJobDefinition processes requests to register new job definitions POST /job-definitions Expects JSON body containing job definition

Jump to

Keyboard shortcuts

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