Sink represents the destination for the binary log entries.
| 43 | |
| 44 | // Sink represents the destination for the binary log entries. |
| 45 | type Sink interface { |
| 46 | // Write marshals the log entry and writes it to the destination. The format |
| 47 | // is not specified, but should have sufficient information to rebuild the |
| 48 | // entry. Some options are: proto bytes, or proto json. |
| 49 | // |
| 50 | // Note this function needs to be thread-safe. |
| 51 | Write(*binlogpb.GrpcLogEntry) error |
| 52 | // Close closes this sink and cleans up resources (e.g. the flushing |
| 53 | // goroutine). |
| 54 | Close() error |
| 55 | } |
| 56 | |
| 57 | // NewTempFileSink creates a temp file and returns a Sink that writes to this |
| 58 | // file. |
nothing calls this directly
no outgoing calls
no test coverage detected