Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol string
Protocol represents the application-layer protocol detected on a TCP stream.
type Record ¶
type Record struct {
Timestamp time.Time `json:"ts"`
Proto Protocol `json:"proto"`
SrcIP string `json:"src_ip"`
DstIP string `json:"dst_ip"`
Method string `json:"method"`
Path string `json:"path"`
Status int `json:"status"`
GRPCStatus string `json:"grpc_status,omitempty"`
DurationMs float64 `json:"duration_ms"`
TraceID string `json:"trace_id,omitempty"`
// SrcName and DstName are resolved by the CLI, not set by trcd.
SrcName string `json:"src_name,omitempty"`
DstName string `json:"dst_name,omitempty"`
}
Record is a single request/response pair captured from the network. trcd emits these as NDJSON; the CLI reads and enriches them with service names.
func (Record) MarshalNDJSON ¶
MarshalNDJSON encodes r as a single JSON line followed by a newline.
func (*Record) UnmarshalNDJSON ¶
UnmarshalNDJSON decodes a single JSON line into r.
Click to show internal directories.
Click to hide internal directories.