Documentation
¶
Overview ¶
Package server exposes claumeter's parsed usage over a small HTTP API. Widgets (waybar, eww, sketchybar, …) and dashboards consume these endpoints instead of re-parsing the JSONL transcripts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker fan-outs a single message to N SSE subscribers. Slow subscribers have their message dropped rather than blocking the publisher.
func (*Broker) Unsubscribe ¶
type Options ¶
type Options struct {
Root string
Addr string // e.g. "127.0.0.1:7777"
Token string // optional bearer; empty = open
Version string // passed into /healthz
}
Options configures a Server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewWithStore ¶
func (*Server) ListenAndServe ¶
ListenAndServe runs until the context is cancelled or the server errors.
func (*Server) PublishToday ¶
func (s *Server) PublishToday()
PublishToday computes a fresh `today` payload and pushes it to SSE subscribers. Called by the file-watch feeder after a reload.
Click to show internal directories.
Click to hide internal directories.