41#ifndef A11_ACTIONS_BUILTINS_H_
42#define A11_ACTIONS_BUILTINS_H_
48#include <absl/base/nullability.h>
66inline constexpr std::string_view
kPingName =
"__ping";
A11's unit of work: the Action and its supporting types.
Schemas describing an action's typed interface and its settings.
const std::vector< std::string > & BuiltinActionNames()
Every builtin's name, sorted.
Definition builtins.cc:279
constexpr std::string_view kPingName
Echoes a value, so a caller can tell A11 from anything holding a port.
Definition builtins.h:66
bool IsBuiltinAction(std::string_view name)
Whether name is a builtin every registry answers for.
Definition builtins.cc:267
constexpr std::string_view kGetSchemaName
Returns one action's schema, or NotFound.
Definition builtins.h:58
const BuiltinAction *absl_nullable GetBuiltinAction(std::string_view name)
The builtin named name, or null.
Definition builtins.cc:271
constexpr std::string_view kListActionsName
Lists the actions a peer serves, with their schemas.
Definition builtins.h:56
std::function< a11::Task(std::shared_ptr< Action >)> ActionHandler
Asynchronous action handler: runs the action, returns an awaitable.
Definition action.h:90
The full typed interface of an action.
Definition schema.h:138
A schema and handler pair the registry resolves without holding.
Definition builtins.h:69
ActionHandler handler
Definition builtins.h:71
ActionSchema schema
Definition builtins.h:70