|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Classes | |
| class | Action |
| A11's unit of work: a schema-described, asynchronously run operation. More... | |
| struct | ActionHeaderSchema |
| Schema for a single header an action accepts. More... | |
| class | ActionLimiter |
| Cancellation-aware counting semaphore for nested-action concurrency. More... | |
| struct | ActionPortSchema |
| Schema for a single input or output port of an action. More... | |
| class | ActionRegistry |
| A thread-safe catalogue mapping action names to schema and handler. More... | |
| struct | ActionSchema |
| The full typed interface of an action. More... | |
| struct | ActionSettings |
| Per-action runtime settings for stream binding and cleanup. More... | |
Typedefs | |
| using | ActionHandler = std::function< a11::Task(std::shared_ptr< Action >)> |
| Asynchronous action handler: runs the action, returns an awaitable. | |
| using | SyncActionHandler = std::function< absl::Status(std::shared_ptr< Action >)> |
| Synchronous action handler returning a completion status. | |
| using | OnActionCancelled = std::function< absl::Status(std::shared_ptr< Action >)> |
| Callback invoked when an action is cancelled. | |
Functions | |
| ActionHandler | MakeAsyncActionHandler (SyncActionHandler handler) |
| Adapts a synchronous handler into an asynchronous ActionHandler. | |
| absl::StatusOr< data::Chunk > | StatusToChunk (const absl::Status &status) |
| Encodes a status as a chunk (mimetype kActionStatusMimetype). | |
| absl::StatusOr< absl::Status > | StatusFromChunk (const data::Chunk &chunk) |
| Decodes a status previously encoded by StatusToChunk. | |
| bool | IsStatusChunk (const data::Chunk &chunk) |
Whether chunk carries an encoded action status. | |
Variables | |
| constexpr size_t | kDefaultMaxConcurrentNestedActions = 64 |
| Default cap on concurrently running nested actions. | |
| constexpr std::string_view | kActionStatusMimetype |
| Mimetype marking a chunk that carries an action status. | |
| constexpr std::string_view | kActionStatusOutput = "__status__" |
| Reserved output port name carrying the action's completion status. | |
| constexpr std::string_view | kActionDispatchStatusOutput |
| Reserved output port name carrying the remote dispatch status. | |
| constexpr std::string_view | kCancelActionName = "__cancel__" |
| Reserved action name used to signal cancellation to a peer. | |
| constexpr std::string_view | kCancelActionHeader = "__action" |
| Header naming the action targeted by a cancel request. | |
| constexpr std::string_view | kActionHeaderPrefix = "x-a11-" |
| Prefix reserved for A11's framework headers. | |
| using a11::actions::ActionHandler = typedef std::function<a11::Task(std::shared_ptr<Action>)> |
Asynchronous action handler: runs the action, returns an awaitable.
| using a11::actions::OnActionCancelled = typedef std::function<absl::Status(std::shared_ptr<Action>)> |
Callback invoked when an action is cancelled.
| using a11::actions::SyncActionHandler = typedef std::function<absl::Status(std::shared_ptr<Action>)> |
Synchronous action handler returning a completion status.
| bool a11::actions::IsStatusChunk | ( | const data::Chunk & | chunk | ) |
Whether chunk carries an encoded action status.
| ActionHandler a11::actions::MakeAsyncActionHandler | ( | SyncActionHandler | handler | ) |
Adapts a synchronous handler into an asynchronous ActionHandler.
| absl::StatusOr< absl::Status > a11::actions::StatusFromChunk | ( | const data::Chunk & | chunk | ) |
Decodes a status previously encoded by StatusToChunk.
| absl::StatusOr< data::Chunk > a11::actions::StatusToChunk | ( | const absl::Status & | status | ) |
Encodes a status as a chunk (mimetype kActionStatusMimetype).
|
inlineconstexpr |
Reserved output port name carrying the remote dispatch status.
|
inlineconstexpr |
Prefix reserved for A11's framework headers.
|
inlineconstexpr |
Mimetype marking a chunk that carries an action status.
|
inlineconstexpr |
Reserved output port name carrying the action's completion status.
|
inlineconstexpr |
Header naming the action targeted by a cancel request.
|
inlineconstexpr |
Reserved action name used to signal cancellation to a peer.