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

Method ServeHTTP

coderd/aibridged/utils_test.go:18–23  ·  view source on GitHub ↗
(rw http.ResponseWriter, _ *http.Request)

Source from the content-addressed store, hash-verified

16}
17
18func (m *mockAIUpstreamServer) ServeHTTP(rw http.ResponseWriter, _ *http.Request) {
19 m.hitCounter.Add(1)
20
21 rw.WriteHeader(http.StatusTeapot)
22 _, _ = rw.Write([]byte(`i am a teapot`))
23}
24
25func (m *mockAIUpstreamServer) Hits() int32 {
26 return m.hitCounter.Load()

Callers

nothing calls this directly

Calls 3

AddMethod · 0.65
WriteMethod · 0.65
WriteHeaderMethod · 0.45

Tested by

no test coverage detected