Class: Fluent::Plugin::ServiceDiscovery

Inherits:
Base
  • Object
show all
Includes:
Fluent::PluginId, Fluent::PluginLoggerMixin, UniqueId::Mixin
Defined in:
lib/fluent/plugin/service_discovery.rb

Defined Under Namespace

Classes: DiscoveryMessage, Service

Constant Summary collapse

SERVICE_IN =
:service_in
SERVICE_OUT =
:service_out

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary collapse

Attributes included from Fluent::PluginLoggerMixin

#log

Attributes inherited from Base

#under_plugin_development

Class Method Summary collapse

Instance Method Summary collapse

Methods included from UniqueId::Mixin

#dump_unique_id_hex, #generate_unique_id

Methods included from Fluent::PluginLoggerMixin

#configure, included, #terminate

Methods included from Fluent::PluginId

#configure, #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?, #configure, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #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, #configure_proxy_generate, #configured_section_create, included, lookup_type, register_type

Constructor Details

#initializeServiceDiscovery

Returns a new instance of ServiceDiscovery.



54
55
56
57
58
# File 'lib/fluent/plugin/service_discovery.rb', line 54

def initialize
  @services = []

  super
end

Instance Attribute Details

#servicesObject (readonly)

Returns the value of attribute services.



32
33
34
# File 'lib/fluent/plugin/service_discovery.rb', line 32

def services
  @services
end

Class Method Details

.service_in_msg(service) ⇒ Object



45
46
47
# File 'lib/fluent/plugin/service_discovery.rb', line 45

def service_in_msg(service)
  DiscoveryMessage.new(SERVICE_IN, service)
end

.service_out_msg(service) ⇒ Object



49
50
51
# File 'lib/fluent/plugin/service_discovery.rb', line 49

def service_out_msg(service)
  DiscoveryMessage.new(SERVICE_OUT, service)
end

Instance Method Details

#start(queue = nil) ⇒ Object



60
61
62
# File 'lib/fluent/plugin/service_discovery.rb', line 60

def start(queue = nil)
  super()
end