api

command
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command api is a thin HTTP wrapper over the queue Store — the proof-of-concept for non-Go producers, plus a Prometheus /metrics endpoint over the journal and a minimal live stats page. PoC scope: no auth, no write-path beyond enqueue — bind it to localhost only.

Usage:

go run ./examples/api --db tasks.db --addr 127.0.0.1:8095

Endpoints:

POST /enqueue  {"type":"sh","project":"demo","payload":{"cmd":"echo hi"}}
GET  /stats    per-status task counts (JSON)
GET  /metrics  Prometheus text format (fact counters + status gauges)
GET  /         single-page live view of /stats

Jump to

Keyboard shortcuts

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