Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
goby::middleware::tool::interface::detail Namespace Reference

Classes

class  Arithmetic
 
struct  Bind
 One bind: entry of a platform or of an application in its run: list. More...
 
class  D2Writer
 Writes a deployment as D2 (https://d2lang.com): the same containers, colors and edge conventions as the DOT output, with styles defined once as classes. More...
 
class  DotWriter
 
struct  GroupKey
 
class  InterfaceFinder
 Finds interface files by path, or by the application: they declare. More...
 
struct  ModuleRef
 
struct  PlatformRef
 
struct  RunRef
 

Functions

std::string replace_all (std::string text, const std::string &from, const std::string &to)
 
std::string first_word_basename (const std::string &command)
 
bool in_unit (const LaunchEntry &e, const LaunchUnit &unit)
 
const Application * application (const LaunchUnit &unit, const LaunchEntry &e)
 
bool requires_intervehicle (const Application &app)
 
std::string when_command (const std::string &when)
 A when: condition as a shell command: "A =~ REGEX", "A == B", "A != B", or a command whose exit status decides. Kept free of '[' and ']', which end goby_launch's [directives].
 
std::string escape_double_quoted (const std::string &text)
 
bool is_gobyd (const LaunchEntry &e)
 
std::vector< std::string > expand_auto (const std::vector< std::string > &given, const std::vector< std::string > &derived)
 
std::string expand_variables (const std::string &text, const std::map< std::string, std::string > &defines, std::set< std::string > &unset)
 Replace ${NAME} and ${NAME:-default} from defines, then the environment.
 
bool load_yaml_text (const std::string &text, const std::string &path, const std::string &code, const std::string &location, Issues &issues, YAML::Node &yaml)
 
bool load_yaml (const std::string &path, const std::string &code, const std::string &location, Issues &issues, YAML::Node &yaml)
 
std::vector< std::string > read_list (const YAML::Node &node)
 
bool layer_from_name (const std::string &name, Layer &layer)
 
std::regex glob_regex (const std::string &glob)
 
bool eval_numeric (const std::string &text, const std::vector< std::uint32_t > &instances, std::set< std::uint32_t > &values, std::string &error)
 Evaluate a bind's numeric: "5", "151-153", or arithmetic with ${instance}, once per instance given.
 
std::vector< std::shared_ptr< Bind > > read_binds (const YAML::Node &node, const std::string &location, Issues &issues)
 
Application::Binder make_binder (std::vector< std::shared_ptr< Bind > > binds, std::vector< std::uint32_t > instances)
 
bool valid_kill (const std::string &kill)
 
KeyValues read_env (const YAML::Node &node, const std::string &location, Issues &issues)
 
SystemdSettings read_systemd_settings (const YAML::Node &node, const std::string &location, Issues &issues)
 
bool read_launch (const YAML::Node &entry, RunRef &ref, Issues &issues)
 
LaunchSettings read_launch_settings (const YAML::Node &node, const std::string &location, Issues &issues)
 
std::string with_instance (std::string text, const std::vector< std::uint32_t > &instances)
 
LaunchSettings for_instance (LaunchSettings settings, const std::vector< std::uint32_t > &instances)
 
PlatformSystemd read_platform_systemd (const YAML::Node &node, const std::string &location, Issues &issues)
 
SystemdSettings for_instance (SystemdSettings settings, const std::vector< std::uint32_t > &instances)
 
LaunchEntry for_instance (LaunchEntry entry, const std::vector< std::uint32_t > &instances)
 
std::vector< RunRef > read_run (const YAML::Node &node, bool legacy, const std::string &location, Issues &issues)
 
bool read_applications (const YAML::Node &node, const std::string &location, std::vector< RunRef > &refs, Issues &issues)
 Reads the application list of a platform or module: run: (by application name) or the older interfaces: (by file)
 
std::string declared_application (const std::string &path)
 The application an interface file declares, or "" if it is not one (generated interface files start with "application: <name>")
 
void apply_necessity_overrides (const YAML::Node &node, Deployment &deployment, Issues &issues)
 Apply a deployment's necessity: list, which sets the necessity of the subscriptions it selects whatever the code said.
 
std::vector< std::string > search_dirs (const std::string &deployment_path, const LoadParams &params)
 
GroupKey group_key (const PubSubEntry &e)
 
std::string d2_quoted (const std::string &s)
 
std::string d2_tooltip (const std::string &s)
 
void html_escape (std::string &s, bool do_break_before_lt=true, bool do_break_after_commas=true)
 
std::string html_escaped (std::string s, bool break_before_lt=true, bool break_after_commas=true)
 
std::string dot_id (const std::string &s)
 
std::string dot_quoted (const std::string &s)
 
std::string short_group (const std::string &group)
 
std::string unit_name (const std::string &name)
 
std::optional< bool > evaluate_when (const std::string &when)
 A when: condition decided now, from the values -D and the environment gave the deployment; nullopt when it cannot be (a value left for the shell, or a command)
 
SystemdSettings merged (const SystemdSettings &defaults, const SystemdSettings &own)
 
std::string exec_start (const std::string &command)
 
std::string substitute (std::string text, const std::map< std::string, std::string > &vars)
 
Issue::Subject subject (const Unmatched &u)
 
std::string describe (const PubSubEntry &e)
 

Function Documentation

◆ application()

const Application * goby::middleware::tool::interface::detail::application ( const LaunchUnit &  unit,
const LaunchEntry &  e 
)
inline

Definition at line 92 of file launch.h.

◆ apply_necessity_overrides()

void goby::middleware::tool::interface::detail::apply_necessity_overrides ( const YAML::Node &  node,
Deployment &  deployment,
Issues &  issues 
)
inline

Apply a deployment's necessity: list, which sets the necessity of the subscriptions it selects whatever the code said.

Definition at line 1381 of file model.h.

◆ d2_quoted()

std::string goby::middleware::tool::interface::detail::d2_quoted ( const std::string &  s)
inline

Definition at line 55 of file render_d2.h.

◆ d2_tooltip()

std::string goby::middleware::tool::interface::detail::d2_tooltip ( const std::string &  s)
inline

Definition at line 74 of file render_d2.h.

◆ declared_application()

std::string goby::middleware::tool::interface::detail::declared_application ( const std::string &  path)
inline

The application an interface file declares, or "" if it is not one (generated interface files start with "application: <name>")

Definition at line 1281 of file model.h.

◆ describe()

std::string goby::middleware::tool::interface::detail::describe ( const PubSubEntry &  e)
inline

Definition at line 80 of file validate.h.

◆ dot_id()

std::string goby::middleware::tool::interface::detail::dot_id ( const std::string &  s)
inline

Definition at line 108 of file render_dot.h.

◆ dot_quoted()

std::string goby::middleware::tool::interface::detail::dot_quoted ( const std::string &  s)
inline

Definition at line 121 of file render_dot.h.

◆ escape_double_quoted()

std::string goby::middleware::tool::interface::detail::escape_double_quoted ( const std::string &  text)
inline

Definition at line 132 of file launch.h.

◆ eval_numeric()

bool goby::middleware::tool::interface::detail::eval_numeric ( const std::string &  text,
const std::vector< std::uint32_t > &  instances,
std::set< std::uint32_t > &  values,
std::string &  error 
)
inline

Evaluate a bind's numeric: "5", "151-153", or arithmetic with ${instance}, once per instance given.

Definition at line 692 of file model.h.

◆ evaluate_when()

std::optional< bool > goby::middleware::tool::interface::detail::evaluate_when ( const std::string &  when)
inline

A when: condition decided now, from the values -D and the environment gave the deployment; nullopt when it cannot be (a value left for the shell, or a command)

Definition at line 65 of file systemd.h.

◆ exec_start()

std::string goby::middleware::tool::interface::detail::exec_start ( const std::string &  command)
inline

Definition at line 104 of file systemd.h.

◆ expand_auto()

std::vector< std::string > goby::middleware::tool::interface::detail::expand_auto ( const std::vector< std::string > &  given,
const std::vector< std::string > &  derived 
)
inline

Definition at line 203 of file launch.h.

◆ expand_variables()

std::string goby::middleware::tool::interface::detail::expand_variables ( const std::string &  text,
const std::map< std::string, std::string > &  defines,
std::set< std::string > &  unset 
)
inline

Replace ${NAME} and ${NAME:-default} from defines, then the environment.

"$${" is a literal "${". A name with no value is left as written.

Definition at line 475 of file model.h.

◆ first_word_basename()

std::string goby::middleware::tool::interface::detail::first_word_basename ( const std::string &  command)
inline

Definition at line 80 of file launch.h.

◆ for_instance() [1/3]

LaunchEntry goby::middleware::tool::interface::detail::for_instance ( LaunchEntry  entry,
const std::vector< std::uint32_t > &  instances 
)
inline

Definition at line 1163 of file model.h.

◆ for_instance() [2/3]

LaunchSettings goby::middleware::tool::interface::detail::for_instance ( LaunchSettings  settings,
const std::vector< std::uint32_t > &  instances 
)
inline

Definition at line 1060 of file model.h.

◆ for_instance() [3/3]

SystemdSettings goby::middleware::tool::interface::detail::for_instance ( SystemdSettings  settings,
const std::vector< std::uint32_t > &  instances 
)
inline

Definition at line 1149 of file model.h.

◆ glob_regex()

std::regex goby::middleware::tool::interface::detail::glob_regex ( const std::string &  glob)
inline

Definition at line 592 of file model.h.

◆ group_key()

GroupKey goby::middleware::tool::interface::detail::group_key ( const PubSubEntry &  e)
inline

Definition at line 274 of file pubsub_entry.h.

◆ html_escape()

void goby::middleware::tool::interface::detail::html_escape ( std::string &  s,
bool  do_break_before_lt = true,
bool  do_break_after_commas = true 
)
inline

Definition at line 79 of file render_dot.h.

◆ html_escaped()

std::string goby::middleware::tool::interface::detail::html_escaped ( std::string  s,
bool  break_before_lt = true,
bool  break_after_commas = true 
)
inline

Definition at line 100 of file render_dot.h.

◆ in_unit()

bool goby::middleware::tool::interface::detail::in_unit ( const LaunchEntry &  e,
const LaunchUnit &  unit 
)
inline

Definition at line 87 of file launch.h.

◆ is_gobyd()

bool goby::middleware::tool::interface::detail::is_gobyd ( const LaunchEntry &  e)
inline

Definition at line 144 of file launch.h.

◆ layer_from_name()

bool goby::middleware::tool::interface::detail::layer_from_name ( const std::string &  name,
Layer &  layer 
)
inline

Definition at line 577 of file model.h.

◆ load_yaml()

bool goby::middleware::tool::interface::detail::load_yaml ( const std::string &  path,
const std::string &  code,
const std::string &  location,
Issues &  issues,
YAML::Node &  yaml 
)
inline

Definition at line 552 of file model.h.

◆ load_yaml_text()

bool goby::middleware::tool::interface::detail::load_yaml_text ( const std::string &  text,
const std::string &  path,
const std::string &  code,
const std::string &  location,
Issues &  issues,
YAML::Node &  yaml 
)
inline

Definition at line 535 of file model.h.

◆ make_binder()

Application::Binder goby::middleware::tool::interface::detail::make_binder ( std::vector< std::shared_ptr< Bind > >  binds,
std::vector< std::uint32_t >  instances 
)
inline

Definition at line 863 of file model.h.

◆ merged()

SystemdSettings goby::middleware::tool::interface::detail::merged ( const SystemdSettings &  defaults,
const SystemdSettings &  own 
)
inline

Definition at line 82 of file systemd.h.

◆ read_applications()

bool goby::middleware::tool::interface::detail::read_applications ( const YAML::Node &  node,
const std::string &  location,
std::vector< RunRef > &  refs,
Issues &  issues 
)
inline

Reads the application list of a platform or module: run: (by application name) or the older interfaces: (by file)

Definition at line 1261 of file model.h.

◆ read_binds()

std::vector< std::shared_ptr< Bind > > goby::middleware::tool::interface::detail::read_binds ( const YAML::Node &  node,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 736 of file model.h.

◆ read_env()

KeyValues goby::middleware::tool::interface::detail::read_env ( const YAML::Node &  node,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 924 of file model.h.

◆ read_launch()

bool goby::middleware::tool::interface::detail::read_launch ( const YAML::Node &  entry,
RunRef &  ref,
Issues &  issues 
)
inline

Definition at line 953 of file model.h.

◆ read_launch_settings()

LaunchSettings goby::middleware::tool::interface::detail::read_launch_settings ( const YAML::Node &  node,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 1003 of file model.h.

◆ read_list()

std::vector< std::string > goby::middleware::tool::interface::detail::read_list ( const YAML::Node &  node)
inline

Definition at line 567 of file model.h.

◆ read_platform_systemd()

PlatformSystemd goby::middleware::tool::interface::detail::read_platform_systemd ( const YAML::Node &  node,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 1121 of file model.h.

◆ read_run()

std::vector< RunRef > goby::middleware::tool::interface::detail::read_run ( const YAML::Node &  node,
bool  legacy,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 1175 of file model.h.

◆ read_systemd_settings()

SystemdSettings goby::middleware::tool::interface::detail::read_systemd_settings ( const YAML::Node &  node,
const std::string &  location,
Issues &  issues 
)
inline

Definition at line 1073 of file model.h.

◆ replace_all()

std::string goby::middleware::tool::interface::detail::replace_all ( std::string  text,
const std::string &  from,
const std::string &  to 
)
inline

Definition at line 70 of file launch.h.

◆ requires_intervehicle()

bool goby::middleware::tool::interface::detail::requires_intervehicle ( const Application &  app)
inline

Definition at line 105 of file launch.h.

◆ search_dirs()

std::vector< std::string > goby::middleware::tool::interface::detail::search_dirs ( const std::string &  deployment_path,
const LoadParams &  params 
)
inline

Definition at line 1488 of file model.h.

◆ short_group()

std::string goby::middleware::tool::interface::detail::short_group ( const std::string &  group)
inline

Definition at line 133 of file render_dot.h.

◆ subject()

Issue::Subject goby::middleware::tool::interface::detail::subject ( const Unmatched &  u)
inline

Definition at line 63 of file validate.h.

◆ substitute()

std::string goby::middleware::tool::interface::detail::substitute ( std::string  text,
const std::map< std::string, std::string > &  vars 
)
inline

Definition at line 118 of file systemd.h.

◆ unit_name()

std::string goby::middleware::tool::interface::detail::unit_name ( const std::string &  name)
inline

Definition at line 55 of file systemd.h.

◆ valid_kill()

bool goby::middleware::tool::interface::detail::valid_kill ( const std::string &  kill)
inline

Definition at line 919 of file model.h.

◆ when_command()

std::string goby::middleware::tool::interface::detail::when_command ( const std::string &  when)
inline

A when: condition as a shell command: "A =~ REGEX", "A == B", "A != B", or a command whose exit status decides. Kept free of '[' and ']', which end goby_launch's [directives].

Definition at line 117 of file launch.h.

◆ with_instance()

std::string goby::middleware::tool::interface::detail::with_instance ( std::string  text,
const std::vector< std::uint32_t > &  instances 
)
inline

Definition at line 1050 of file model.h.