Class: Bosh::Monitor::Plugins::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/monitor/plugins/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/bosh/monitor/plugins/base.rb', line 8

def initialize(options = {})
  @logger  = Bhm.logger
  @options = (options || {}).dup
  @event_kinds = []
end

Instance Attribute Details

#event_kindsObject (readonly)

Returns the value of attribute event_kinds.



6
7
8
# File 'lib/bosh/monitor/plugins/base.rb', line 6

def event_kinds
  @event_kinds
end

#loggerObject (readonly)

Returns the value of attribute logger.



4
5
6
# File 'lib/bosh/monitor/plugins/base.rb', line 4

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/bosh/monitor/plugins/base.rb', line 5

def options
  @options
end

Instance Method Details

#process(event) ⇒ Object

Raises:



22
23
24
# File 'lib/bosh/monitor/plugins/base.rb', line 22

def process(event)
  raise FatalError, "'process' method is not implemented in '#{self.class}'"
end

#runObject

Raises:



18
19
20
# File 'lib/bosh/monitor/plugins/base.rb', line 18

def run
  raise FatalError, "'run' method is not implemented in '#{self.class}'"
end

#validate_optionsObject



14
15
16
# File 'lib/bosh/monitor/plugins/base.rb', line 14

def validate_options
  true
end