Class: Backup::Notifier::PagerDuty

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/notifier/pagerduty.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#max_retries, #message, #model, #on_failure, #on_success, #on_warning, #retry_waitsec

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Config::Helpers

included

Constructor Details

#initialize(mode, &block) ⇒ PagerDuty

Returns a new instance of PagerDuty.



19
20
21
22
23
24
# File 'lib/backup/notifier/pagerduty.rb', line 19

def initialize(mode, &block)
  super
  instance_eval(&block) if block_given?

  @resolve_on_warning ||= false
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers

Instance Attribute Details

#resolve_on_warningObject

Determines if a backup with a warning should resolve an incident rather than trigger one.

Defaults to false.



17
18
19
# File 'lib/backup/notifier/pagerduty.rb', line 17

def resolve_on_warning
  @resolve_on_warning
end

#service_keyObject

PagerDuty Service API Key. Should be a 32 character hex string.



10
11
12
# File 'lib/backup/notifier/pagerduty.rb', line 10

def service_key
  @service_key
end