eventlog

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package eventlog is an append-only, sequence-numbered event log backed by a JSONL file. It is the resume backbone: viewers reconnect with a sequence cursor and replay exactly what they missed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Seq  uint64 `json:"seq"`
	Type string `json:"t"`
	Data []byte `json:"d"` // std json base64-encodes []byte
	TS   int64  `json:"ts"`
}

type Log

type Log struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Log, error)

func (*Log) Append

func (l *Log) Append(typ string, data []byte) (uint64, error)

func (*Log) Close

func (l *Log) Close() error

func (*Log) LastSeq

func (l *Log) LastSeq() uint64

func (*Log) Since

func (l *Log) Since(seq uint64) ([]Entry, error)

Jump to

Keyboard shortcuts

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