api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package api exposes the gateway over HTTP: the public ingest endpoint, the admin JSON API, and a thin server-rendered dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store         storage.Store
	Capturer      *ingest.Capturer
	Sources       *source.Service
	Metrics       *metrics.Metrics
	IngestLimiter *ratelimit.Limiter
	AdminToken    string
	MaxBody       int64
	Logger        *slog.Logger
}

Config wires a Server.

type Server

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

Server holds the API dependencies.

func NewServer

func NewServer(cfg Config) *Server

NewServer builds a Server.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler builds the HTTP router. The ingest endpoint and health check are public; everything else requires the admin token.

Jump to

Keyboard shortcuts

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