Skip to content

Allow to read current writer offset #1

@dim

Description

@dim

Something like this would be nice:

// Offset returns the latest Offset written (not necessarily synced).
func (wal *WAL) Offset() Offset {
	wal.mx.RLock()
	off := newOffset(wal.fileSequence, wal.position)
	wal.mx.RUnlock()

	return off
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions