Update according to review

This commit is contained in:
jhadvig
2014-09-15 18:20:01 +02:00
parent f351691493
commit 6da2653b4a
4 changed files with 20 additions and 22 deletions

View File

@@ -98,17 +98,17 @@ func (h *httpActionHandler) Run(podFullName, uuid string, container *api.Contain
return err
}
// flusherWriter provides wrapper for responseWriter with HTTP streaming capabilities
// FlusherWriter provides wrapper for responseWriter with HTTP streaming capabilities
type FlushWriter struct {
flusher http.Flusher
writer io.Writer
}
// Write is a flushWriter implementation of the io.Writer that sends any buffered data to the client.
// Write is a FlushWriter implementation of the io.Writer that sends any buffered data to the client.
func (fw *FlushWriter) Write(p []byte) (n int, err error) {
n, err = fw.writer.Write(p)
if err != nil {
return n, err
return
}
if fw.flusher != nil {
fw.flusher.Flush()