Documentation ¶
Index ¶
- Constants
- Variables
- type LogFile
- type ReadableLog
- func (w *ReadableLog) CloseWriter() error
- func (w *ReadableLog) NextData(off int64) (int64, error)
- func (w *ReadableLog) NextHole(off int64) (int64, error)
- func (w *ReadableLog) ReadAt(p []byte, off int64) (int, error)
- func (w *ReadableLog) Trim(off, length int64) error
- func (w *ReadableLog) WriteAt(p []byte, off int64) (int, error)
- func (w *ReadableLog) Written() int64
- type Reader
- type Writer
- func (w *Writer) CloseWriter() error
- func (w *Writer) LogSize() int64
- func (w *Writer) NextData(off int64) (int64, error)
- func (w *Writer) NextHole(off int64) (int64, error)
- func (w *Writer) ReadAtFrom(r io.ReaderAt, b []byte, off int64) (int, error)
- func (w *Writer) Size() int64
- func (w *Writer) Trim(off, length int64) error
- func (w *Writer) WriteAt(p []byte, off int64) (int, error)
Constants ¶
View Source
const ( HeaderMagic = "lblog\x31\x41\x59" )
View Source
const (
MaxWriteSize = 1 << 22
)
Variables ¶
View Source
var ( ErrUnexpectedEOF = io.ErrUnexpectedEOF ErrCorruptedLog = errors.New("wal: log corrupted") )
View Source
var ( ErrWriteTooBig = errors.New("wal: write size too big") ErrWriterClosed = errors.New("wal: writer closed") )
Functions ¶
This section is empty.
Types ¶
type ReadableLog ¶
type ReadableLog struct {
// contains filtered or unexported fields
}
func NewReadableLog ¶
func NewReadableLog(lf LogFile) *ReadableLog
func (*ReadableLog) CloseWriter ¶
func (w *ReadableLog) CloseWriter() error
func (*ReadableLog) Trim ¶
func (w *ReadableLog) Trim(off, length int64) error
func (*ReadableLog) Written ¶
func (w *ReadableLog) Written() int64
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) CloseWriter ¶
func (*Writer) ReadAtFrom ¶
Click to show internal directories.
Click to hide internal directories.