infrastructure

package
v0.268.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLLog

type JSONLLog struct{}

JSONLLog keeps one room's log as an append-only JSONL file at ~/.infer/projects/<slug of the room's project>/rooms/<room>.jsonl.

func NewJSONLLog

func NewJSONLLog() *JSONLLog

NewJSONLLog returns the file-backed room log writing under the userspace projects root.

func (*JSONLLog) Append

func (l *JSONLLog) Append(room roomsdomain.Room, post roomsdomain.Post) error

Append adds post to the room's log, stamping a post that carries no time. The log is append-only: the file is always opened for appending, and the rooms dir is created on the way.

func (*JSONLLog) Clear

func (l *JSONLLog) Clear(room roomsdomain.Room) error

Clear removes the room's log, so the room reads as never written. A log that does not exist is already clear.

func (*JSONLLog) Read

func (l *JSONLLog) Read(room roomsdomain.Room) ([]roomsdomain.Post, error)

Read returns the room's posts in the order they were appended, an empty list for a room whose log was never written. A line that does not decode, such as one a crash tore mid-write, is skipped so it costs only itself.

Jump to

Keyboard shortcuts

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