MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_log_segment

Function read_log_segment

nodedb/src/engine/timeseries/reader.rs:225–231  ·  view source on GitHub ↗

Read and decode a log segment from disk. Returns all log entries. Requires a dictionary registry for Zstd dictionary decompression.

(
    path: &Path,
    registry: &DictionaryRegistry,
)

Source from the content-addressed store, hash-verified

223/// Returns all log entries. Requires a dictionary registry for
224/// Zstd dictionary decompression.
225pub fn read_log_segment(
226 path: &Path,
227 registry: &DictionaryRegistry,
228) -> Result<LogSegmentData, SegmentReadError> {
229 let data = std::fs::read(path)?;
230 read_log_segment_from_bytes(&data, registry)
231}
232
233/// Read and decode a log segment from in-memory bytes.
234pub fn read_log_segment_from_bytes(

Callers 1

scan_logsMethod · 0.85

Calls 2

readFunction · 0.50

Tested by

no test coverage detected