file

package
v0.0.0-...-be15534 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogWriter

func NewLogWriter(
	ctx context.Context, cfg *writer.LogWriterConfig, opts ...writer.Option,
) (lw *logWriter, err error)

NewLogWriter create a new logWriter.

Types

type Writer

type Writer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Writer is a redo log event Writer which writes redo log events to a file.

func NewFileWriter

func NewFileWriter(
	ctx context.Context, cfg *writer.LogWriterConfig, opts ...writer.Option,
) (*Writer, error)

NewFileWriter return a file rotated writer, TODO: extract to a common rotate Writer

func (*Writer) AdvanceTs

func (w *Writer) AdvanceTs(commitTs uint64)

AdvanceTs implement Advance interface

func (*Writer) Close

func (w *Writer) Close() error

Close implements fileWriter.Close.

func (*Writer) Flush

func (w *Writer) Flush() error

Flush implement Flush interface

func (*Writer) IsRunning

func (w *Writer) IsRunning() bool

IsRunning implement IsRunning interface

func (*Writer) Write

func (w *Writer) Write(rawData []byte) (int, error)

Write implement write interface TODO: more general api with fileName generated by caller

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL