httpserver

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package httpserver is gitrakz's only servicepack service: it boots the whole app — SQLite storage + migrations, the gh sync engine, the transform/template engine, the LLM adapters, and an aichteeteapee/serbewr HTTP server mounting the generated API under /api/v1/ plus the embedded Svelte SPA — and runs a background sync ticker for the lifetime of the process.

Index

Constants

View Source
const ServiceName = "http-server"

ServiceName is this service's registry key, matching the folder name convention (http-server -> package httpserver) per wiring-servicepack.md.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service implements servicemanager.Service. New wires every dependency eagerly and fails fast; Run starts the HTTP server and the background sync ticker and blocks until ctx is done; Stop tears both down.

func New

func New() (*Service, error)

New builds every dependency the service needs (config, storage, migrations, the gh sync engine, the transform/template engine, the LLM adapters, and the HTTP server) and fails fast on the first error — no partially-wired Service is ever returned.

func (*Service) Name

func (s *Service) Name() string

Name returns this service's registry key.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run starts the HTTP server and the background sync ticker, and blocks until ctx is done or the server fails. serbewr.Server.Start already performs its own graceful shutdown internally once ctx is done (or Stop is called), so Run does not repeat that step.

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

Stop shuts down the HTTP server (a no-op if Run's own shutdown already ran — serbewr.Server.Stop is idempotent) and closes the db store.

Jump to

Keyboard shortcuts

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