(b []byte)
| 27 | } |
| 28 | |
| 29 | func (o *orderedWriter) Write(b []byte) (int, error) { |
| 30 | // Snapshot the X-LocalAI-Node header value AT THE INSTANT the underlying |
| 31 | // writer is asked to commit bytes. This is what real HTTP clients |
| 32 | // effectively observe: anything set on the header map AFTER this point |
| 33 | // would be silently dropped. |
| 34 | o.events = append(o.events, "write:node="+o.Header().Get(NodeHeaderName)) |
| 35 | return o.ResponseWriter.Write(b) |
| 36 | } |
| 37 | |
| 38 | func (o *orderedWriter) Flush() { |
| 39 | o.events = append(o.events, "flush:node="+o.Header().Get(NodeHeaderName)) |
no test coverage detected