Module: LogStash::PluginMixins::Scheduler

Extended by:
Util::ThreadSafeAttributes
Defined in:
lib/logstash/plugin_mixins/scheduler.rb,
lib/logstash/plugin_mixins/scheduler/rufus_impl.rb

Defined Under Namespace

Modules: JobInterface, RufusImpl, SchedulerInterface

Class Method Summary collapse

Class Method Details

.included(base) ⇒ void

This method returns an undefined value.

Parameters:

  • : a class that inherits LogStash::Plugin, typically one descending from one of the four plugin base classes (e.g., LogStash::Inputs::Base)

Raises:



20
21
22
23
24
25
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 20

def self.included(base)
  fail(ArgumentError, "`#{base}` must inherit LogStash::Plugin") unless base < LogStash::Plugin
  instance_methods = base.instance_methods
  base.send(:prepend, StopHook) if instance_methods.include?(:stop)
  base.send(:prepend, CloseHook) if instance_methods.include?(:close)
end