(e *binlogpb.GrpcLogEntry)
| 97 | } |
| 98 | |
| 99 | func (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error { |
| 100 | fs.mu.Lock() |
| 101 | defer fs.mu.Unlock() |
| 102 | if !fs.flusherStarted { |
| 103 | // Start the write loop when Write is called. |
| 104 | fs.startFlushGoroutine() |
| 105 | fs.flusherStarted = true |
| 106 | } |
| 107 | if err := fs.out.Write(e); err != nil { |
| 108 | return err |
| 109 | } |
| 110 | return nil |
| 111 | } |
| 112 | |
| 113 | const ( |
| 114 | bufFlushDuration = 60 * time.Second |
nothing calls this directly
no test coverage detected