A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::data::WireMessage Struct Reference

The top-level frame exchanged between two A11 endpoints. More...

#include <cpp/a11/data/types.h>

Public Member Functions

size_t ApproxBytes () const
 Estimate memory/wire weight before admitting this message to a buffer.
 
std::string DebugString () const
 Return a concise representation suitable for logs and diagnostics.
 
absl::Status Validate () const
 Validate every contained fragment, action, and header.
 
absl::StatusOr< BytesToMsgpack () const
 Encodes this message as MessagePack bytes.
 

Static Public Member Functions

static absl::StatusOr< WireMessageFromMsgpack (std::string_view bytes)
 Decodes MessagePack bytes into a WireMessage.
 

Public Attributes

std::vector< NodeFragmentnode_fragments {}
 Streamed data fragments.
 
std::vector< ActionMessageactions {}
 Action invocations.
 
ByteMap headers {}
 Message-level headers.
 

Static Public Attributes

static constexpr std::uint32_t kVersion = 1
 Wire format version.
 

Friends

bool operator== (const WireMessage &, const WireMessage &)=default
 
template<typename Sink >
void AbslStringify (Sink &sink, const WireMessage &value)
 

Detailed Description

The top-level frame exchanged between two A11 endpoints.

Batches any number of a11::data::NodeFragment payloads and a11::data::ActionMessage invocations together with connection-level headers into a single unit sent across a stream. A half-close message (see MakeHalfCloseMessage) is a WireMessage that signals the sender is done writing.

Member Function Documentation

◆ ApproxBytes()

size_t a11::data::WireMessage::ApproxBytes ( ) const

Estimate memory/wire weight before admitting this message to a buffer.

◆ DebugString()

std::string a11::data::WireMessage::DebugString ( ) const

Return a concise representation suitable for logs and diagnostics.

◆ FromMsgpack()

absl::StatusOr< WireMessage > a11::data::WireMessage::FromMsgpack ( std::string_view  bytes)
static

Decodes MessagePack bytes into a WireMessage.

◆ ToMsgpack()

absl::StatusOr< Bytes > a11::data::WireMessage::ToMsgpack ( ) const

Encodes this message as MessagePack bytes.

◆ Validate()

absl::Status a11::data::WireMessage::Validate ( ) const

Validate every contained fragment, action, and header.

Friends And Related Symbol Documentation

◆ AbslStringify

template<typename Sink >
void AbslStringify ( Sink sink,
const WireMessage value 
)
friend

◆ operator==

bool operator== ( const WireMessage ,
const WireMessage  
)
friend

Member Data Documentation

◆ actions

std::vector<ActionMessage> a11::data::WireMessage::actions {}

Action invocations.

◆ headers

ByteMap a11::data::WireMessage::headers {}

Message-level headers.

◆ kVersion

constexpr std::uint32_t a11::data::WireMessage::kVersion = 1
staticconstexpr

Wire format version.

◆ node_fragments

std::vector<NodeFragment> a11::data::WireMessage::node_fragments {}

Streamed data fragments.


The documentation for this struct was generated from the following files: