|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Schemas describing an action's typed interface and its settings. More...
#include <memory>#include <optional>#include <string>#include <string_view>#include <vector>#include <absl/container/flat_hash_map.h>#include <absl/status/status.h>#include <absl/status/statusor.h>#include "a11/data/types.h"Go to the source code of this file.
Classes | |
| struct | a11::actions::ActionPortSchema |
| Schema for a single input or output port of an action. More... | |
| struct | a11::actions::ActionHeaderSchema |
| Schema for a single header an action accepts. More... | |
| struct | a11::actions::ActionSchema |
| The full typed interface of an action. More... | |
| struct | a11::actions::ActionSettings |
| Per-action runtime settings for stream binding and cleanup. More... | |
Namespaces | |
| namespace | a11 |
| namespace | a11::actions |
Functions | |
| absl::StatusOr< data::Chunk > | a11::actions::StatusToChunk (const absl::Status &status) |
| Encodes a status as a chunk (mimetype kActionStatusMimetype). | |
| absl::StatusOr< absl::Status > | a11::actions::StatusFromChunk (const data::Chunk &chunk) |
| Decodes a status previously encoded by StatusToChunk. | |
| bool | a11::actions::IsStatusChunk (const data::Chunk &chunk) |
Whether chunk carries an encoded action status. | |
Variables | |
| constexpr std::string_view | a11::actions::kActionStatusMimetype |
| Mimetype marking a chunk that carries an action status. | |
| constexpr std::string_view | a11::actions::kActionStatusOutput = "__status__" |
| Reserved output port name carrying the action's completion status. | |
| constexpr std::string_view | a11::actions::kActionDispatchStatusOutput |
| Reserved output port name carrying the remote dispatch status. | |
| constexpr std::string_view | a11::actions::kCancelActionName = "__cancel__" |
| Reserved action name used to signal cancellation to a peer. | |
| constexpr std::string_view | a11::actions::kCancelActionHeader = "__action" |
| Header naming the action targeted by a cancel request. | |
| constexpr std::string_view | a11::actions::kActionHeaderPrefix = "x-a11-" |
| Prefix reserved for A11's framework headers. | |
Schemas describing an action's typed interface and its settings.
An a11::actions::ActionSchema is the declarative description of an action: its name and description, its typed input and output ports (a11::actions::ActionPortSchema) and its declared headers (a11::actions::ActionHeaderSchema). a11::actions::ActionSettings captures per-action runtime behaviour (stream binding and post-run cleanup). This header also defines the reserved names/mimetypes A11 uses to carry an action's status on the wire, and helpers to move a status through a a11::data::Chunk.