api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package api provides the HTTP API server for the control plane.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the current version of the API server. This should be set at build time using ldflags.

Functions

This section is empty.

Types

type Server

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

Server represents the HTTP API server.

func NewServer

func NewServer(cfg *config.Config, st store.Store, q queue.Queue, authSvc *auth.Service, logger *slog.Logger) *Server

NewServer creates a new API server with the given dependencies.

func (*Server) Router

func (s *Server) Router() chi.Router

Router returns the chi router for testing purposes.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the HTTP server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the HTTP server.

Directories

Path Synopsis
Package errors provides structured error types and response helpers for the API.
Package errors provides structured error types and response helpers for the API.
Package handlers provides HTTP request handlers for the API.
Package handlers provides HTTP request handlers for the API.
Package health provides health check functionality for API components.
Package health provides health check functionality for API components.
Package middleware provides HTTP middleware for the API server.
Package middleware provides HTTP middleware for the API server.

Jump to

Keyboard shortcuts

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