Class: Stoplight::Wiring::System::LightBuilder Private

Inherits:
LightBuilder
  • Object
show all
Defined in:
lib/stoplight/wiring/system/light_builder.rb,
sig/_private/stoplight/system/light_builder.rbs

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants inherited from LightBuilder

LightBuilder::FAILOVER_DATA_STORE_CONFIG, LightBuilder::MEMORY_REGISTRY

Instance Attribute Summary collapse

Attributes inherited from LightBuilder

#clock, #config, #data_store_config, #error_notifier, #factory, #traffic_control, #traffic_recovery

Instance Method Summary collapse

Methods inherited from LightBuilder

#build, #create_data_store, #data_store, #failover_data_store, #green_run_strategy, #memory_recovery_lock_store, #memory_registry, #notifiers, #recovery_probe_tracker, #red_run_strategy, #redis, #redis_recovery_lock_store, #request_tracker, #scripting, #yellow_run_strategy

Constructor Details

#initialize(system:, config:, factory:) ⇒ LightBuilder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LightBuilder.

Parameters:



7
8
9
10
11
# File 'lib/stoplight/wiring/system/light_builder.rb', line 7

def initialize(system:, config:, factory:)
  @system = system

  super(config:, factory:)
end

Instance Attribute Details

#systemSystem (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



24
25
26
# File 'lib/stoplight/wiring/system/light_builder.rb', line 24

def system
  @system
end

Instance Method Details

#key_spaceInfrastructure::Redis::Storage::KeySpace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
# File 'lib/stoplight/wiring/system/light_builder.rb', line 13

def key_space = @key_space ||= Infrastructure::Redis::Storage::KeySpace.build(
  system_name: system.name,
  light_name: config.name
)

#storage_setObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/stoplight/wiring/system/light_builder.rb', line 18

def storage_set
  @storage_set ||= StorageSetBuilder.new(backend: build_backend, windowed: !config.window_size.nil?).build
end