A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::interpreter::RunOptions Struct Reference

How to run it. More...

#include <cpp/a11/flow/interpreter/interpreter.h>

Public Attributes

std::vector< std::string > arguments
 The program's argv.
 
sdk::flow::CapabilitiesPtr capabilities
 Required policy describing what the program may do.
 
std::shared_ptr< actions::ActionRegistry > registry
 Registry to run against. A null value creates a new registry.
 
std::optional< absl::Duration > timeout
 Bound for the run and the standard-library actions it starts.
 
bool standard_streams = true
 Whether to bind this process's own standard streams.
 
std::shared_ptr< HostBridge > bridge
 How the program reaches types and chunks its host knows about.
 
std::shared_ptr< net::WireStream > dispatch_stream
 Where the program's call steps go, when they are to leave this process.
 
std::shared_ptr< service::Session > session
 The session the dispatch stream belongs to.
 

Detailed Description

How to run it.

Member Data Documentation

◆ arguments

std::vector<std::string> a11::flow::interpreter::RunOptions::arguments

The program's argv.

By convention arguments[0] is the file, as a C program's is, so what a person typed starts at index 1 – and argc is the size of this, counting it.

◆ bridge

std::shared_ptr<HostBridge> a11::flow::interpreter::RunOptions::bridge

How the program reaches types and chunks its host knows about.

A null bridge uses A11's C++ type registry. Hosts provide a bridge when programs need host-defined types or chunk conversions.

◆ capabilities

sdk::flow::CapabilitiesPtr a11::flow::interpreter::RunOptions::capabilities

Required policy describing what the program may do.

◆ dispatch_stream

std::shared_ptr<net::WireStream> a11::flow::interpreter::RunOptions::dispatch_stream

Where the program's call steps go, when they are to leave this process.

Null – the default – means a program composes what this process serves, and a call naming something with no handler here fails saying so. Given a stream, call steps are dispatched on it while run steps stay local, which is the same split a named flow gets from a11::flow::RunOptions::dispatch_stream.

The peer's actions still have to be registered in registry for their schemas, because the resolver looks a name up before it decides anything.

◆ registry

std::shared_ptr<actions::ActionRegistry> a11::flow::interpreter::RunOptions::registry

Registry to run against. A null value creates a new registry.

◆ session

std::shared_ptr<service::Session> a11::flow::interpreter::RunOptions::session

The session the dispatch stream belongs to.

Required alongside dispatch_stream and useless without it: a dispatched call's reply fragments are routed by the session's node map, so a program given a stream and no session would send its calls and never hear back.

◆ standard_streams

bool a11::flow::interpreter::RunOptions::standard_streams = true

Whether to bind this process's own standard streams.

Disable this in hosts such as servers and notebooks that do not provide useful process streams.

◆ timeout

std::optional<absl::Duration> a11::flow::interpreter::RunOptions::timeout

Bound for the run and the standard-library actions it starts.


The documentation for this struct was generated from the following file: