server

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompletedHandler

func NewCompletedHandler(checker status.Checker) http.HandlerFunc

NewCompletedHandler creates a handler for the /api/v1/completed endpoint.

func NewHealthHandler

func NewHealthHandler() http.HandlerFunc

NewHealthHandler creates a handler for the /health endpoint.

func NewInboxHandler added in v0.10.0

func NewInboxHandler(inboxDir string) http.HandlerFunc

NewInboxHandler creates a handler for the /api/v1/inbox endpoint.

func NewQueueActionHandler added in v0.10.0

func NewQueueActionHandler(
	inboxDir string,
	queueDir string,
	promptManager prompt.Manager,
) http.HandlerFunc

NewQueueActionHandler creates a handler for POST /api/v1/queue endpoints.

func NewQueueHandler

func NewQueueHandler(checker status.Checker) http.HandlerFunc

NewQueueHandler creates a handler for the /api/v1/queue endpoint.

func NewStatusHandler

func NewStatusHandler(checker status.Checker) http.HandlerFunc

NewStatusHandler creates a handler for the /api/v1/status endpoint.

Types

type InboxFile added in v0.10.0

type InboxFile struct {
	Name string `json:"name"`
}

InboxFile represents a file in the inbox directory.

type InboxListResponse added in v0.10.0

type InboxListResponse struct {
	Files []InboxFile `json:"files"`
}

InboxListResponse represents the response for GET /api/v1/inbox.

type QueueRequest added in v0.10.0

type QueueRequest struct {
	File string `json:"file"`
}

QueueRequest represents the request body for POST /api/v1/queue.

type QueueResponse added in v0.10.0

type QueueResponse struct {
	Queued []QueuedFile `json:"queued"`
}

QueueResponse represents the response for POST /api/v1/queue.

type QueuedFile added in v0.10.0

type QueuedFile struct {
	Old string `json:"old"`
	New string `json:"new"`
}

QueuedFile represents a single queued file.

type Server

type Server interface {
	ListenAndServe(ctx context.Context) error
}

Server provides HTTP endpoints for status and monitoring.

func NewServer

func NewServer(
	addr string,
	statusChecker status.Checker,
	inboxDir string,
	queueDir string,
	promptManager prompt.Manager,
) Server

NewServer creates a new Server.

Jump to

Keyboard shortcuts

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