Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
FileWriter is a binlog event writer which writes binlog events to a file.
func (*FileWriter) Status ¶
func (w *FileWriter) Status() interface{}
Status implements Writer.Status.
func (*FileWriter) Write ¶
func (w *FileWriter) Write(rawData []byte) error
Write implements Writer.Write.
type FileWriterConfig ¶
type FileWriterConfig struct {
Filename string
}
FileWriterConfig is the configuration used by a FileWriter.
type FileWriterStatus ¶
type FileWriterStatus struct { Stage string `json:"stage"` Filename string `json:"filename"` Offset int64 `json:"offset"` }
FileWriterStatus represents the status of a FileWriter.
func (*FileWriterStatus) String ¶
func (s *FileWriterStatus) String() string
String implements Stringer.String.
type Writer ¶
type Writer interface { // Start prepares the writer for writing binlog events. Start() error // Close closes the writer and release the resource. Close() error // Write writes/appends a binlog event's rawData. Write(rawData []byte) error // Flush flushes the buffered data to a stable storage or sends through the network. Flush() error // Status returns the status of the writer. Status() interface{} }
Writer is a binlog event writer, it may write binlog events to a binlog file, an in-memory structure or a TCP stream.
func NewFileWriter ¶
func NewFileWriter(tctx *tcontext.Context, cfg *FileWriterConfig) Writer
NewFileWriter creates a FileWriter instance.
Click to show internal directories.
Click to hide internal directories.