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

The wire description of an action invocation. More...

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

Public Member Functions

size_t ApproxBytes () const
 Estimate memory/wire weight for session and transport limits.
 
std::string DebugString () const
 Return a concise representation suitable for logs and diagnostics.
 
absl::Status Validate () const
 Validate the invocation id, action name, ports, and headers.
 
absl::StatusOr< BytesToMsgpack () const
 Encodes this message as MessagePack bytes.
 

Static Public Member Functions

static absl::StatusOr< ActionMessageFromMsgpack (std::string_view bytes)
 Decodes MessagePack bytes into an ActionMessage.
 

Public Attributes

std::string id
 Unique id of this action instance.
 
std::string name
 Registered action name.
 
std::vector< Portinputs {}
 Input port -> node bindings.
 
std::vector< Portoutputs {}
 Output port -> node bindings.
 
ByteMap headers {}
 Per-call headers.
 

Friends

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

Detailed Description

The wire description of an action invocation.

Names the action (name) and the specific instance (id), lists the a11::data::Port bindings for its inputs and outputs, and carries per-call headers. This is what a peer sends to dispatch an action and what an a11::actions::Action produces to describe itself.

Member Function Documentation

◆ ApproxBytes()

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

Estimate memory/wire weight for session and transport limits.

◆ DebugString()

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

Return a concise representation suitable for logs and diagnostics.

◆ FromMsgpack()

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

Decodes MessagePack bytes into an ActionMessage.

◆ ToMsgpack()

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

Encodes this message as MessagePack bytes.

◆ Validate()

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

Validate the invocation id, action name, ports, and headers.

Friends And Related Symbol Documentation

◆ AbslStringify

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

◆ operator==

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

Member Data Documentation

◆ headers

ByteMap a11::data::ActionMessage::headers {}

Per-call headers.

◆ id

std::string a11::data::ActionMessage::id

Unique id of this action instance.

◆ inputs

std::vector<Port> a11::data::ActionMessage::inputs {}

Input port -> node bindings.

◆ name

std::string a11::data::ActionMessage::name

Registered action name.

◆ outputs

std::vector<Port> a11::data::ActionMessage::outputs {}

Output port -> node bindings.


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