fakeoriginallog

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fakeoriginallog is a test double for the host-composed original-log adapter behind facade4datatug.OriginalLogOpener. The real DALgo adapter is composed and tested by the host. It imports no backend package, so internal facade tests can use it without an import cycle.

Index

Constants

This section is empty.

Variables

View Source
var ErrLimit = errors.New("fake original log: limit exceeded")

ErrLimit reports a source over a configured limit.

View Source
var ErrPath = errors.New("fake original log: invalid immutable source path")

ErrPath reports a configured path that is not a clean, local, slash-separated path.

Functions

This section is empty.

Types

type DB

type DB struct {
	dal.DB

	Closed bool
	// contains filtered or unexported fields
}

DB frames JSONL entries (terminator included) and exposes them by the hex SHA-256 of their source_ref. Only Get and Close are implemented; any other dal.DB method panics on the nil embedded DB.

func Open

func Open(files fs.FS, source Source) (*DB, error)

Open reads source.Path from files and frames it. It never closes files.

func (*DB) Close

func (d *DB) Close() error

func (*DB) Get

func (d *DB) Get(_ context.Context, r record.Record) error

type Source

type Source struct {
	ID, Collection, Path, TimestampField string
	MaxFileBytes                         int64
	MaxLineBytes, MaxEntries             int
}

Source is the trusted configuration of one JSONL log, mirroring the backend's original-log port without importing it.

Jump to

Keyboard shortcuts

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