Class: Qurd::Action Abstract
- Inherits:
-
Object
- Object
- Qurd::Action
- Extended by:
- Mixins::AwsClients, Mixins::Configuration
- Includes:
- Mixins::AwsClients, Mixins::Configuration
- Defined in:
- lib/qurd/action.rb,
lib/qurd/action/chef.rb,
lib/qurd/action/dummy.rb,
lib/qurd/action/route53.rb
Overview
Subclass and override #launch, #launch_error, #terminate, #terminate_error, and #test, optionally override class method #Qurd#Qurd::Action#Qurd::Action.configure and instance methods #run_before and #run_after
Defined Under Namespace
Classes: Chef, Dummy, InvalidMessage, Route53
Instance Attribute Summary collapse
-
#context ⇒ Cabin::Context
readonly
The logging context.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
-
.configure(_action) ⇒ Object
Optionally configure the plugin
launch
,launch_error
,terminate
,terminate_error
, ortest
.
Instance Method Summary collapse
-
#aws_credentials ⇒ Aws::Credentials
Aws credentials for the message.
-
#initialize(message) ⇒ Action
constructor
Run the plugin for a given Message.
- #inspect ⇒ Object
-
#launch ⇒ Object
(also: #launch_error, #terminate, #terminate_error, #test)
Run the plugin.
-
#region ⇒ String
Aws region for the message.
-
#run_after ⇒ Object
Executed after the processor runs the plugins for an action.
-
#run_before ⇒ Object
Executed before the processor runs the plugins for an action.
Methods included from Mixins::Configuration
qurd_config, qurd_configuration, qurd_logger, qurd_logger!
Methods included from Mixins::AwsClients
Constructor Details
Instance Attribute Details
#context ⇒ Cabin::Context (readonly)
The logging context
26 27 28 |
# File 'lib/qurd/action.rb', line 26 def context @context end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
26 |
# File 'lib/qurd/action.rb', line 26 attr_reader :context, :message |
Class Method Details
.configure(_action) ⇒ Object
Optionally configure the plugin launch
, launch_error
, terminate
, terminate_error
, or test
31 32 33 |
# File 'lib/qurd/action.rb', line 31 def self.configure(_action) qurd_logger.debug('Nothing to do') end |
Instance Method Details
#aws_credentials ⇒ Aws::Credentials
Aws credentials for the message
57 58 59 |
# File 'lib/qurd/action.rb', line 57 def aws_credentials .aws_credentials end |
#inspect ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/qurd/action.rb', line 82 def inspect format('<%s:%x instance_id:%s message_id:%s context:%s>', self.class, object_id, .instance_id, ., context.inspect ) end |
#launch ⇒ Object Also known as: launch_error, terminate, terminate_error, test
Run the plugin
68 69 70 |
# File 'lib/qurd/action.rb', line 68 def launch qurd_logger!("Override the abstract method #{__method__}") end |
#region ⇒ String
Aws region for the message
51 52 53 |
# File 'lib/qurd/action.rb', line 51 def region .region end |
#run_after ⇒ Object
Executed after the processor runs the plugins for an action
78 79 80 |
# File 'lib/qurd/action.rb', line 78 def run_after qurd_logger.debug('Nothing to do') end |
#run_before ⇒ Object
Executed before the processor runs the plugins for an action
63 64 65 |
# File 'lib/qurd/action.rb', line 63 def run_before qurd_logger.debug('Nothing to do') end |