// Flush calls the http.Flusher flush method
176469
func (rw *responseWriter) Flush() {
	if fw, ok := rw.w.(http.Flusher); ok {
		fw.Flush()
	}
}
1326128
func (c *conn) Flush() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	return c.buf.Flush()
}
107972
func (c *HTTPTransport) Flush() (int, error) {
	count := len(c.batch)
	if count == 0 {
		return 0, nil
	}
	err := c.send(c.batch)
	c.batch = c.batch[:0]
	return count, err
}
844355
func (b *Buffer) Flush() {
	b.prepare(b.bufferSize())

	for i := range b.buffers {
		if buffer := &b.buffers[i]; buffer.acquire() {
			buffer.flush(b.Serializer, buffer.len())
			buffer.release()
		}
	}
}
1125602
func (w *Writer) Flush() error {
	l := len(w.buf)
	if l > 0 {
		n, err := w.w.Write(w.buf)

		// if we didn't write the whole
		// thing, copy the unwritten
		// bytes to the beginnning of the
		// buffer.
		if n < l && n > 0 {
			w.pushback(n)
			if err == nil {
				err = io.ErrShortWrite
			}
		}
		if err != nil {
			return err
		}
		w.buf = w.buf[:0]
		return nil
	}
	return nil
}
628192
func (bw *BufferedFileWriter) Flush() {
	bw.mu.Lock()
	// could add check if bw.done already
	//  should never happen
	bw.bufWriter.Flush()
	bw.origWriter.f.Sync()
	bw.mu.Unlock()
}
767818
func (b *Batch) Flush() (err error) {
	if b.Size() == 0 {
		return nil
	}

	buf, err := b.Bytes()
	if err != nil {
		return err
	}

	b.Docs = nil

	return b.Elastic.Bulk(buf)
}
1304632
func (s *clientIOSession) Flush() error {
	buf := s.out
	written := 0
	all := buf.Readable()
	for {
		if written == all {
			break
		}

		n, err := s.conn.Write(buf.buf[buf.readerIndex+written : buf.writerIndex])
		if err != nil {
			for _, sm := range s.svr.opts.middlewares {
				sm.WriteError(err, s)
			}
			s.out.Clear()
			return err
		}

		written += n
	}

	s.out.Clear()
	return nil
}
159229
func (s *StatusCheck) Flush() []InterMetric {
	s.Timestamp = time.Now().Unix()
	s.Type = StatusMetric
	s.Sinks = routeInfo(s.Tags)
	return []InterMetric{s.InterMetric}
}
1010138
func (f *flushingResponseWriter) Flush() {
	if flusher, ok := f.ResponseWriter.(http.Flusher); ok {
		flusher.Flush()
	}
}
373926
func (w *compressWriter) Flush() {
	if w.encoder != nil {
		w.encoder.Flush()
	}
	if w, ok := w.ResponseWriter.(http.Flusher); ok {
		w.Flush()
	}
}
1112211
func (req *SrvReq) Flush() {
	req.Lock()
	req.status |= reqFlush
	req.Unlock()
	req.Respond()
}
1109162
func (l *BytesBufferLogger) Flush() {
	l.mux.Lock()
	defer l.mux.Unlock()
	l.buf.Reset()
}
969795
func (w *Writer) Flush() error {
	if (!w.dirty && w.Buffered() == 0) || w.err != nil {
		return w.err
	}

	w.err = w.flushFragment(true)
	w.n = 0
	w.dirty = false
	w.fragmented = false

	return w.err
}
62820
func (w *GatedWriter) Flush() {
	w.lock.Lock()
	w.flush = true
	w.lock.Unlock()

	for _, p := range w.buf {
		w.Write(p)
	}
	w.buf = nil
}
80947
func (f *FileWriter) Flush() error {
	if f.closed {
		return io.ErrClosedPipe
	}

	if f.blockWriter != nil {
		return f.blockWriter.Flush()
	}

	return nil
}
1086263
func (rww *responseWriterWrapper) Flush() {
	if f, ok := rww.w.(http.Flusher); ok {
		f.Flush()
	} else {
		panic(httpserver.NonFlusherError{Underlying: rww.w}) // should be recovered at the beginning of middleware stack
	}
}