httpapi

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Overview

Package httpapi wires akari-server's HTTP surface: authentication, account and token management, and the session ingest protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Store *store.Store
	Cfg   config.Server
	// contains filtered or unexported fields
}

Server holds the dependencies shared by all handlers.

func New

func New(st *store.Store, cfg config.Server, worker *parse.Worker) *Server

New builds a Server. The parse worker is shared with the server main loop; here it backs the admin Reparse button, the rebuild status endpoint, and the UI gating. Its hooks fan out through the SSE hub: fleet-rebuild progress to the status stream, and each committed rebuild to the browsers watching that session.

func (*Server) Routes

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

Routes returns the HTTP handler for the whole API.

func (*Server) RunInsightsRefresher added in v0.5.4

func (s *Server) RunInsightsRefresher(ctx context.Context)

RunInsightsRefresher runs the fleet insights snapshot's background cadence until ctx is cancelled. The server main loop runs it beside the other background loops; serving works without it (a cold read computes on demand), it just loses the proactive recompute.

Jump to

Keyboard shortcuts

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