From 6392e4e196b0e63850d2bd8b627465e543e339aa Mon Sep 17 00:00:00 2001 From: kami Date: Sun, 26 Jul 2026 20:34:47 +0400 Subject: [PATCH] expose federated event cursor transport --- cmd/orchestra/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/orchestra/main.go b/cmd/orchestra/main.go index ef0becd..3bc1f54 100644 --- a/cmd/orchestra/main.go +++ b/cmd/orchestra/main.go @@ -362,6 +362,14 @@ func main() { w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(worker) }) + mux.HandleFunc("/v1/federation/events", func(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodGet { + http.Error(w, "method not allowed", 405) + return + } + cursor, _ := strconv.ParseUint(r.URL.Query().Get("since"), 10, 64) + json.NewEncoder(w).Encode(s.Events(cursor)) + }) mux.HandleFunc("/v1/federation/workers/", func(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost || !strings.HasSuffix(r.URL.Path, "/heartbeat") { http.Error(w, "not found", 404)