ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
action_handler Class Referenceabstract

Abstract interface for job action execution. More...

#include <action_handler.hpp>

Inheritance diagram for action_handler:
Inheritance graph
Collaboration diagram for action_handler:
Collaboration graph

Public Member Functions

virtual std::string_view action_type () const noexcept=0
 Returns the action_type string handled by this implementation.
 
virtual boost::asio::awaitable< std::expected< void, std::string > > execute (const action_context &ctx)=0
 Execute the action for the given job.
 

Detailed Description

Abstract interface for job action execution.

Implementations execute one action_type (e.g., "execute_sql", "send_mq_message").

Member Function Documentation

◆ action_type()

virtual std::string_view action_type ( ) const
pure virtualnoexcept

Returns the action_type string handled by this implementation.

Implemented in mq_action_handler, nats_publish_action_handler, and sql_action_handler.

◆ execute()

virtual boost::asio::awaitable< std::expected< void, std::string > > execute ( const action_context ctx)
pure virtual

Execute the action for the given job.

Returns
An expected<void, string> where the string contains the error message on failure.

Implemented in mq_action_handler, nats_publish_action_handler, and sql_action_handler.