|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
A11's unit of work: the Action and its supporting types. More...
#include <cstddef>#include <functional>#include <memory>#include <optional>#include <string>#include <string_view>#include <vector>#include <absl/base/thread_annotations.h>#include <absl/container/flat_hash_map.h>#include <absl/container/flat_hash_set.h>#include <absl/status/status.h>#include <absl/status/statusor.h>#include <absl/time/time.h>#include "a11/actions/schema.h"#include "a11/concurrency/future.h"#include "a11/data/types.h"#include "a11/obs/span.h"#include "thread/boost_primitives.h"Go to the source code of this file.
Classes | |
| class | a11::actions::ActionLimiter |
| Cancellation-aware counting semaphore for nested-action concurrency. More... | |
| class | a11::actions::Action |
| A11's unit of work: a schema-described, asynchronously run operation. More... | |
Namespaces | |
| namespace | thread |
| namespace | a11 |
| namespace | a11::net |
| namespace | a11::nodes |
| namespace | a11::service |
| namespace | a11::actions |
Typedefs | |
| using | a11::actions::ActionHandler = std::function< a11::Task(std::shared_ptr< Action >)> |
| Asynchronous action handler: runs the action, returns an awaitable. | |
| using | a11::actions::SyncActionHandler = std::function< absl::Status(std::shared_ptr< Action >)> |
| Synchronous action handler returning a completion status. | |
| using | a11::actions::OnActionCancelled = std::function< absl::Status(std::shared_ptr< Action >)> |
| Callback invoked when an action is cancelled. | |
Functions | |
| ActionHandler | a11::actions::MakeAsyncActionHandler (SyncActionHandler handler) |
| Adapts a synchronous handler into an asynchronous ActionHandler. | |
Variables | |
| constexpr size_t | a11::actions::kDefaultMaxConcurrentNestedActions = 64 |
| Default cap on concurrently running nested actions. | |
A11's unit of work: the Action and its supporting types.
An a11::actions::Action is a named, schema-described operation with typed input and output ports – each an a11::nodes::AsyncNode – and a handler that runs asynchronously, streaming results into its outputs as they are produced. Actions compose: a handler can create nested actions (MakeNested) and run or call them. An action can run locally against in-process nodes (Run / run-in-background) or be dispatched across an a11::net::WireStream to a peer that executes it (Call). The various Bind* methods wire an action up to the collaborators it needs – a handler, node map, stream, registry and session.