Documentation
¶
Index ¶
Constants ¶
View Source
const ( CompressedFlag byte = 0x01 // Message is compressed EndStreamFlag byte = 0x02 // Final message in stream )
Envelope protocol flags
Variables ¶
This section is empty.
Functions ¶
func CreateEnvelope ¶
CreateEnvelope creates an envelope with the given flags and data.
Types ¶
type Envelope ¶
Envelope represents a ConnectRPC envelope message with flags and data. Format: [1 byte flags][4 bytes length][N bytes data]
func ParseEnvelope ¶
ParseEnvelope reads an envelope from the provided data. Returns the parsed envelope and any remaining unconsumed data.
func ReadEnvelope ¶
ReadEnvelope reads a single envelope from an io.Reader.
func (*Envelope) IsCompressed ¶
IsCompressed checks if the envelope has the Compressed flag set.
func (*Envelope) IsEndStream ¶
IsEndStream checks if the envelope has the EndStream flag set.
Click to show internal directories.
Click to hide internal directories.