Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = wal.ErrNotFound
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements slog.Handler to write logs to the Binary WAL.
func NewHandler ¶
func NewHandler(w *WAL, gen *idgen.IDGenerator, entityID uint64, entityName string, component string, opts *slog.HandlerOptions) *Handler
NewHandler creates a new WAL Handler.
type WAL ¶
type WAL struct {
// contains filtered or unexported fields
}
WAL wraps tidwall/wal with MsgPack encoding and auto-indexing.
func (*WAL) FirstIndex ¶
FirstIndex returns the first available index.
func (*WAL) Size ¶
Size returns the approximate size of the WAL directory in bytes. It iterates files in the directory.
func (*WAL) TruncateFront ¶
TruncateFront deletes all records before the given index.
Click to show internal directories.
Click to hide internal directories.