Class: CircuitBreaker::Executors::ServerlessExecutor
- Inherits:
-
BaseExecutor
- Object
- BaseExecutor
- CircuitBreaker::Executors::ServerlessExecutor
- Defined in:
- lib/circuit_breaker/executors/serverless_executor.rb
Instance Attribute Summary
Attributes inherited from BaseExecutor
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(context = {}) ⇒ ServerlessExecutor
constructor
A new instance of ServerlessExecutor.
Methods included from DSL
included, #validate_parameters
Constructor Details
#initialize(context = {}) ⇒ ServerlessExecutor
Returns a new instance of ServerlessExecutor.
6 7 8 9 10 11 |
# File 'lib/circuit_breaker/executors/serverless_executor.rb', line 6 def initialize(context = {}) super @function_name = context[:function_name] @runtime = context[:runtime] @payload = context[:payload] end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/circuit_breaker/executors/serverless_executor.rb', line 13 def execute # Implementation for serverless function execution would go here # This would typically involve invoking a serverless function @result = { function_name: @function_name, runtime: @runtime, payload: @payload, status: 'completed' } end |