Implement Flusher interface for responseRecorder

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
This commit is contained in:
Dorin Geman 2025-06-27 17:16:04 +03:00
parent fcf45f4271
commit ac055739df
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,12 @@ func (rr *responseRecorder) WriteHeader(statusCode int) {
rr.ResponseWriter.WriteHeader(statusCode)
}
func (rr *responseRecorder) Flush() {
if flusher, ok := rr.ResponseWriter.(http.Flusher); ok {
flusher.Flush()
}
}
type RequestResponsePair struct {
ID string `json:"id"`
Model string `json:"model"`