Documentation
¶
Overview ¶
These two accessors are the boundary that keeps busRecord and busRing unexported while the dev session's MCP surface drives both planes: marks recorded by the injected script and marks injected by a tool call land in one ring, on one timeline.
Index ¶
- Variables
- func NewsseHandler() *sseHandler
- func NotifyProxy(host string, port int) error
- type ProxyHelper
- func (p *ProxyHelper) Ingest(records []map[string]any)
- func (p *ProxyHelper) Records(limit int) []map[string]any
- func (proxy *ProxyHelper) RunProxy(bind string, port int, target *url.URL) error
- func (proxy *ProxyHelper) SendSSE(eventType, data string)
- func (proxy *ProxyHelper) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
var BusVerbose bool
BusVerbose turns on one deduped terminal line per ingested record. The hot-reload command wires its --verbose flag here; off by default.
Functions ¶
func NewsseHandler ¶
func NewsseHandler() *sseHandler
func NotifyProxy ¶
NotifyProxy helper to send reload via POST
Types ¶
type ProxyHelper ¶
type ProxyHelper struct {
URL string
Target *url.URL
Sse *sseHandler
// Bus holds the dev observers' decoded traffic (POST ingest, GET read).
Bus *busRing
// DevHandlers serves dev-tooling endpoints by exact request path, before
// proxying (the dev command binds the MCP surface here; --no-mcp binds
// http.NotFound to keep the path answering 404 without a backend round
// trip). Unmatched paths (e.g. the app's /_gothicframework/trace) fall
// through to the app server as before.
DevHandlers map[string]http.Handler
// contains filtered or unexported fields
}
func NewProxyHelper ¶
func NewProxyHelper() ProxyHelper
func (*ProxyHelper) Ingest ¶
func (p *ProxyHelper) Ingest(records []map[string]any)
Ingest adds records to the dev bus ring exactly as the HTTP ingest endpoint would: the --verbose one-line-per-record mirrors as well. This is the direct path for an in-process writer — the take-mark injector.
func (*ProxyHelper) Records ¶
func (p *ProxyHelper) Records(limit int) []map[string]any
Records copies up to limit newest records out of the dev bus ring (newest first; limit < 0 = all). The records are plain maps, shaped as the injected script posts them ({t, kind, dir, event, topic, field, payload}).
func (*ProxyHelper) RunProxy ¶
RunProxy configures and starts the proxy server with bind, port, and target
func (*ProxyHelper) SendSSE ¶
func (proxy *ProxyHelper) SendSSE(eventType, data string)
SSE send via ProxyHelper
func (*ProxyHelper) ServeHTTP ¶
func (proxy *ProxyHelper) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles internal routes and normal proxying