MCPcopy Index your code
hub / github.com/coder/coder / NewTransportFactory

Function NewTransportFactory

coderd/aibridged/transport.go:29–31  ·  view source on GitHub ↗

NewTransportFactory returns an [aibridge.TransportFactory] whose RoundTripper dispatches requests to handler in-process, streaming the response body through an [io.Pipe] so SSE/NDJSON/chunked responses propagate token-by-token just as they would over the wire. handler is typically the aibridged HTT

(handler http.Handler)

Source from the content-addressed store, hash-verified

27// handler is typically the aibridged HTTP entrypoint registered via
28// [API.RegisterInMemoryAIBridgedHTTPHandler].
29func NewTransportFactory(handler http.Handler) aibridge.TransportFactory {
30 return &transportFactory{handler: handler}
31}
32
33type transportFactory struct {
34 handler http.Handler

Calls

no outgoing calls