[bldr]docs
gRPC APIDaemon

Logs

Logs — read content-addressed log streams by their full id {peer_id}/{tenant}/{uuid}. Auth is enforced here: a request may only touch a stream whose tenant equals the tenant stamped by the gRPC middleware.

Logs — read content-addressed log streams by their full id {peer_id}/{tenant}/{uuid}. Auth is enforced here: a request may only touch a stream whose tenant equals the tenant stamped by the gRPC middleware.

Service builder.Logs, 3 rpcs.

StatLogStream(StatLogStreamRequest) -> StatLogStreamResponse

Size / completion metadata for a stream.

Request: StatLogStreamRequest

message StatLogStreamRequest {
  optional string id = 1;
}
Field
idfull log-stream id {peer}/{tenant}/{uuid}

Response: StatLogStreamResponse

message StatLogStreamResponse {
  optional bool exists = 1;
  optional uint64 total_len = 2;
  optional uint64 committed_len = 3;
  optional uint64 line_count = 4;
  optional string committed_cid = 5;
  optional string final_cid = 6;
  optional bool closed = 7;
}
Field
exists 
total_len 
committed_len 
line_count 
committed_cidBlob covering [0, committed_len); empty if none
final_cidcomplete Blob; empty until closed
closed 

ReadLog(ReadLogRequest) -> ReadLogResponse

Read a bounded byte range and return it (request-response).

Request: ReadLogRequest

message ReadLogRequest {
  optional string id = 1;
  optional bool follow = 4;
  oneof _from {
    uint64 from = 2;
  }
  oneof _to {
    uint64 to = 3;
  }
  oneof _channel {
    string channel = 5;
  }
}
Field
id 
fromByte range [from, to). Unset from = 0; unset to = end (or live with follow).
to 
followStreamLog only: keep the stream open past the current end until close.
channelReturn only one channel of a closed stream: "stdout" or "stderr". Unset = the combined stream (the default). Ignores from/to (a channel's bytes don't map to combined offsets). Requires a sealed channel index (a closed pod that ran without a pty).

Response: ReadLogResponse

message ReadLogResponse {
  optional bytes bytes = 1;
  optional string snapshot_cid = 2;
  optional uint64 range_from = 3;
  optional uint64 range_to = 4;
  optional uint64 total_len = 5;
  optional bool closed = 6;
}
Field
bytes 
snapshot_cidCID of the committed Blob slice backing the committed part of the range (empty if the range was entirely in the uncommitted tail).
range_from 
range_to 
total_len 
closed 

StreamLog(ReadLogRequest) -> stream LogEvent

Stream a range live: a committed snapshot CID, then the tail as it arrives, then an end marker. follow tails past the current end until close.

Request: ReadLogRequest

The same message as ReadLogRequest.

Response: LogEvent

A frame of StreamLog output.

message LogEvent {
  oneof event {
    LogSnapshot snapshot = 1;
    LogLine line = 2;
    LogEnd end = 3;
  }
}
Field
snapshotThe already-committed prefix as a single Blob CID (fetch out-of-band, e.g. /download?cid=); the client slices it to its requested from.
lineUncommitted / live bytes beyond the snapshot.
endRange satisfied or stream closed.

Types used above

LogSnapshot

message LogSnapshot {
  optional string cid = 1;
  optional uint64 from = 2;
  optional uint64 to = 3;
}
Field
cid 
from 
to== committed_len at snapshot time

LogLine

message LogLine {
  optional uint64 pos = 1;
  optional bytes bytes = 2;
}

LogEnd

message LogEnd {
  optional string final_cid = 1;
  optional uint64 total_len = 2;
}
Field
final_cidempty if the stream is still open (range satisfied)
total_len 

On this page