jsonl

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package jsonl keeps traced calls as JSON lines appended to a file, one call a line, for any tool that reads JSON lines (and for cartograph traces) to analyse. Several servers may append to one file on a shared volume: each line is written whole in one call.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(in io.Reader) ([]trace.Call, error)

Read reads every call in a JSON lines stream, skipping lines that are not calls.

Types

type Recorder

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

Recorder appends calls to a file.

func Open

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

Open appends to the file at path, creating it.

func (*Recorder) Close

func (r *Recorder) Close() error

Close closes the file.

func (*Recorder) Record

func (r *Recorder) Record(c trace.Call)

Record appends one call. A write that fails is dropped: a trace never fails the call it records.

Jump to

Keyboard shortcuts

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