17#ifndef A11_FLOW_RUNTIME_H_
18#define A11_FLOW_RUNTIME_H_
26#include <absl/base/nullability.h>
27#include <absl/status/status.h>
28#include <absl/status/statusor.h>
67 static absl::StatusOr<std::shared_ptr<CompiledProgram>>
Compile(
72 [[nodiscard]]
const std::string&
source()
const {
return source_; }
74 [[nodiscard]]
const std::string&
source_name()
const {
return source_name_; }
76 [[nodiscard]]
const std::vector<Diagnostic>&
diagnostics()
const {
81 [[nodiscard]]
const std::vector<ResolvedFlow>&
flows()
const {
82 return resolved_.
flows;
87 std::string_view
name)
const;
96 std::string source_name_;
105absl::StatusOr<actions::ActionSchema>
FlowSchema(
const FlowPlan& plan);
134 std::shared_ptr<const CompiledProgram> program, std::string_view flow,
145 std::shared_ptr<const CompiledProgram> program, RunOptions options = {});
A11's unit of work: the Action and its supporting types.
Schemas describing an action's typed interface and its settings.
One flow file, compiled: the plans, the graphs, and the tree they borrow.
Definition runtime.h:59
const std::string & source_name() const
Definition runtime.h:74
const Program & program() const
Definition runtime.h:70
const std::vector< ResolvedFlow > & flows() const
The flows in the order they were declared.
Definition runtime.h:81
const ResolvedFlow *absl_nullable Entry() const
The file's entry point – flow { ... } – or nullptr.
Definition runtime.cc:4241
static absl::StatusOr< std::shared_ptr< CompiledProgram > > Compile(std::string source, std::string source_name={})
Compile source, or fail with the first error the way flow.loads does.
Definition runtime.cc:4207
const ResolvedFlow *absl_nullable Flow(std::string_view name) const
The flow of this name, or nullptr. Never the entry flow.
Definition runtime.cc:4226
const std::string & source() const
Definition runtime.h:72
const std::vector< Diagnostic > & diagnostics() const
Definition runtime.h:76
Definition boundary.cc:32
constexpr size_t kQueueDepth
How many values a pipe may run ahead of its reader.
Definition runtime.h:48
absl::StatusOr< actions::ActionHandler > MakeEntryHandler(std::shared_ptr< const CompiledProgram > program, RunOptions options)
The action handler that runs the program's entry flow.
Definition runtime.cc:4348
absl::StatusOr< actions::ActionSchema > FlowSchema(const FlowPlan &plan)
The [actions::ActionSchema] a flow presents.
Definition runtime.cc:4282
absl::StatusOr< actions::ActionHandler > MakeHandler(std::shared_ptr< const CompiledProgram > program, std::string_view flow, RunOptions options)
The action handler that runs one flow of program.
Definition runtime.cc:4309
The flows a file declares, and everything wrong with it.
Definition parser.h:32
Every flow and shape one source file declares.
Definition plan.h:185
A whole file, resolved.
Definition resolve.h:146
Program program
Definition resolve.h:147
std::vector< ResolvedFlow > flows
Definition resolve.h:148
std::vector< Diagnostic > diagnostics
Definition resolve.h:149
One flow, resolved: its plan, its names, and what is wrong with it.
Definition resolve.h:126
What a run needs besides the program.
Definition runtime.h:108
std::shared_ptr< net::WireStream > dispatch_stream
For a flow a client runs over a session it already holds: the call steps that belong to the peer are ...
Definition runtime.h:125
std::shared_ptr< HostBridge > bridge
Who answers the questions only the host can: coercion into a registered type, and reading and writing...
Definition runtime.h:112