Class: Fluent::Plugin::StaticServiceDiscovery

Inherits:
ServiceDiscovery show all
Defined in:
lib/fluent/plugin/sd_static.rb

Constant Summary collapse

LISTEN_PORT =
24224

Constants inherited from ServiceDiscovery

Fluent::Plugin::ServiceDiscovery::SERVICE_IN, Fluent::Plugin::ServiceDiscovery::SERVICE_OUT

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary

Attributes inherited from ServiceDiscovery

#services

Attributes included from Fluent::PluginLoggerMixin

#log

Attributes inherited from Base

#under_plugin_development

Instance Method Summary collapse

Methods inherited from ServiceDiscovery

#initialize, service_in_msg, service_out_msg

Methods included from UniqueId::Mixin

#dump_unique_id_hex, #generate_unique_id

Methods included from Fluent::PluginLoggerMixin

included, #initialize, #terminate

Methods included from Fluent::PluginId

#initialize, #plugin_id, #plugin_id_configured?, #plugin_id_for_test?, #plugin_root_dir, #stop

Methods inherited from Base

#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #called_in_test?, #close, #closed?, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #initialize, #inspect, #multi_workers_ready?, #plugin_root_dir, #reloadable_plugin?, #shutdown, #shutdown?, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Methods included from Configurable

#config, #configure_proxy_generate, #configured_section_create, included, #initialize, lookup_type, register_type

Constructor Details

This class inherits a constructor from Fluent::Plugin::ServiceDiscovery

Instance Method Details

#configure(conf) ⇒ Object



45
46
47
48
49
50
51
# File 'lib/fluent/plugin/sd_static.rb', line 45

def configure(conf)
  super

  @services = @service_configs.map do |s|
    ServiceDiscovery::Service.new(:static, s.host, s.port, s.name, s.weight, s.standby, s.username, s.password, s.shared_key)
  end
end

#start(queue = nil) ⇒ Object



53
54
55
# File 'lib/fluent/plugin/sd_static.rb', line 53

def start(queue = nil)
  super()
end