MCPcopy
hub / github.com/wavetermdev/waveterm / MakeSSEHandlerCh

Function MakeSSEHandlerCh

pkg/web/sse/ssehandler.go:83–90  ·  view source on GitHub ↗

MakeSSEHandlerCh creates a new channel-based SSE handler

(w http.ResponseWriter, ctx context.Context)

Source from the content-addressed store, hash-verified

81
82// MakeSSEHandlerCh creates a new channel-based SSE handler
83func MakeSSEHandlerCh(w http.ResponseWriter, ctx context.Context) *SSEHandlerCh {
84 return &SSEHandlerCh{
85 w: w,
86 rc: http.NewResponseController(w),
87 ctx: ctx,
88 writeCh: make(chan SSEMessage, 10), // Buffered to prevent blocking
89 }
90}
91
92func (h *SSEHandlerCh) Context() context.Context {
93 return h.ctx

Callers 7

WaveAIPostMessageHandlerFunction · 0.92
testOpenAIFunction · 0.92
testOpenAICompFunction · 0.92
testOpenRouterFunction · 0.92
testNanoGPTFunction · 0.92
testAnthropicFunction · 0.92
testGeminiFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected