|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Classes | |
| struct | ActionMessage |
| The wire description of an action invocation. More... | |
| struct | Chunk |
| A unit of data: bytes plus optional descriptive metadata. More... | |
| struct | ChunkMetadata |
| Descriptive metadata attached to a a11::data::Chunk. More... | |
| class | MsgpackReader |
| Sequentially decode the fields of one A11 MessagePack wire record. More... | |
| class | MsgpackWriter |
| Incrementally encode the fields of one A11 wire record. More... | |
| struct | NodeFragment |
| One piece of a node's stream: an inline chunk or a node reference. More... | |
| struct | NodeRef |
| A reference to a (slice of a) logical node, in lieu of inline data. More... | |
| struct | Port |
Binds an action's port name to the concrete node id serving it. More... | |
| class | SerializationRegistry |
| A registry of serializers and deserializers indexed by type and MIME. More... | |
| struct | WireMessage |
| The top-level frame exchanged between two A11 endpoints. More... | |
Typedefs | |
| using | Bytes = std::string |
Raw byte payload; an alias of std::string. | |
| using | ByteMap = absl::flat_hash_map< std::string, Bytes > |
| String-keyed map of byte values (headers, attributes, etc.). | |
Functions | |
| absl::StatusOr< Json > | WireMessageToJsonValue (const WireMessage &message) |
| absl::StatusOr< std::string > | WireMessageToJson (const WireMessage &message) |
| absl::StatusOr< WireMessage > | WireMessageFromJsonValue (const Json &value) |
| absl::StatusOr< WireMessage > | WireMessageFromJson (std::string_view encoded) |
| absl::StatusOr< WireMessage > | WireMessageFromJsonValue (const nlohmann::json &value) |
| nlohmann::json | Binary (std::string_view bytes) |
| Wrap arbitrary bytes as a MessagePack binary JSON value. | |
| absl::StatusOr< std::string > | GetBinary (const nlohmann::json &value, std::string_view field_name) |
Read a binary JSON value, naming field_name in any validation error. | |
| absl::StatusOr< std::string > | PackStatus (const absl::Status &status) |
| Encode a structured Abseil status for action and transport status fields. | |
| absl::StatusOr< absl::Status > | UnpackStatus (std::string_view bytes) |
| Decode a structured status without losing A11 status details. | |
| SerializationRegistry & | GlobalSerializationRegistry () |
| Returns the process-wide registry (defaults pre-installed). | |
| absl::Status | ValidateName (std::string_view name) |
| Validates an A11 identifier (node/port/action name). | |
| bool | IsHalfCloseMessage (const WireMessage &message) |
Whether message is a transport half-close signal. | |
| WireMessage | MakeHalfCloseMessage (ByteMap trailers={}) |
Builds a half-close WireMessage carrying optional trailers. | |
| size_t | EmptyWireMessageSize () |
| The encoded size of an empty WireMessage. | |
Variables | |
| constexpr std::string_view | kJsonMimetype = "application/json" |
| Media type of the built-in JSON codec. | |
| constexpr std::string_view | kMsgpackMimetype = "application/x-msgpack" |
| Media type of the built-in MessagePack codec. | |
| using a11::data::ByteMap = typedef absl::flat_hash_map<std::string, Bytes> |
String-keyed map of byte values (headers, attributes, etc.).
| using a11::data::Bytes = typedef std::string |
Raw byte payload; an alias of std::string.
| nlohmann::json a11::data::Binary | ( | std::string_view | bytes | ) |
Wrap arbitrary bytes as a MessagePack binary JSON value.
| size_t a11::data::EmptyWireMessageSize | ( | ) |
The encoded size of an empty WireMessage.
Computed from the same encoder rather than hard-coded, so it stays correct if the wire format changes.
| absl::StatusOr< std::string > a11::data::GetBinary | ( | const nlohmann::json & | value, |
| std::string_view | field_name | ||
| ) |
Read a binary JSON value, naming field_name in any validation error.
| SerializationRegistry & a11::data::GlobalSerializationRegistry | ( | ) |
Returns the process-wide registry (defaults pre-installed).
| bool a11::data::IsHalfCloseMessage | ( | const WireMessage & | message | ) |
Whether message is a transport half-close signal.
| WireMessage a11::data::MakeHalfCloseMessage | ( | ByteMap | trailers | ) |
Builds a half-close WireMessage carrying optional trailers.
| absl::StatusOr< std::string > a11::data::PackStatus | ( | const absl::Status & | status | ) |
Encode a structured Abseil status for action and transport status fields.
| absl::StatusOr< absl::Status > a11::data::UnpackStatus | ( | std::string_view | bytes | ) |
Decode a structured status without losing A11 status details.
| absl::Status a11::data::ValidateName | ( | std::string_view | name | ) |
Validates an A11 identifier (node/port/action name).
| name | Candidate name. |
name matches A11's identifier grammar, else an error. | absl::StatusOr< WireMessage > a11::data::WireMessageFromJson | ( | std::string_view | encoded | ) |
| absl::StatusOr< WireMessage > a11::data::WireMessageFromJsonValue | ( | const Json & | value | ) |
| absl::StatusOr< WireMessage > a11::data::WireMessageFromJsonValue | ( | const nlohmann::json & | value | ) |
| absl::StatusOr< std::string > a11::data::WireMessageToJson | ( | const WireMessage & | message | ) |
| absl::StatusOr< nlohmann::json > a11::data::WireMessageToJsonValue | ( | const WireMessage & | message | ) |
Media type of the built-in JSON codec.