Class: Stoplight::Domain::Config Private

Inherits:
Data
  • Object
show all
Defined in:
lib/stoplight/domain/config.rb,
lib/stoplight/domain/config.rb,
sig/_private/stoplight/domain/config.rbs

Overview

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.

A Stoplight::Light configuration object.

API:

  • private

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

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.

API:

  • private



32
# File 'sig/_private/stoplight/domain/config.rbs', line 32

def initialize: (

Instance Attribute Details

#cool_off_timeObject (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 the value of attribute cool_off_time

Returns:

  • the current value of cool_off_time

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def cool_off_time
  @cool_off_time
end

#data_storeObject (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 the value of attribute data_store

Returns:

  • the current value of data_store

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def data_store
  @data_store
end

#error_notifierObject (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 the value of attribute error_notifier

Returns:

  • the current value of error_notifier

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def error_notifier
  @error_notifier
end

#nameObject (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 the value of attribute name

Returns:

  • the current value of name

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def name
  @name
end

#notifiersObject (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 the value of attribute notifiers

Returns:

  • the current value of notifiers

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def notifiers
  @notifiers
end

#recovery_thresholdObject (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 the value of attribute recovery_threshold

Returns:

  • the current value of recovery_threshold

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def recovery_threshold
  @recovery_threshold
end

#skipped_errorsObject (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 the value of attribute skipped_errors

Returns:

  • the current value of skipped_errors

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def skipped_errors
  @skipped_errors
end

#thresholdObject (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 the value of attribute threshold

Returns:

  • the current value of threshold

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def threshold
  @threshold
end

#tracked_errorsObject (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 the value of attribute tracked_errors

Returns:

  • the current value of tracked_errors

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def tracked_errors
  @tracked_errors
end

#traffic_controlObject (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 the value of attribute traffic_control

Returns:

  • the current value of traffic_control

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def traffic_control
  @traffic_control
end

#traffic_recoveryObject (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 the value of attribute traffic_recovery

Returns:

  • the current value of traffic_recovery

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def traffic_recovery
  @traffic_recovery
end

#window_sizeObject (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 the value of attribute window_size

Returns:

  • the current value of window_size

API:

  • private



8
9
10
# File 'lib/stoplight/domain/config.rb', line 8

def window_size
  @window_size
end

Class Method Details

.newObject

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.

API:

  • private



17
# File 'sig/_private/stoplight/domain/config.rbs', line 17

def self.new: (

Instance Method Details

#cool_off_time_in_millisecondsInteger

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:

API:

  • private



23
24
25
# File 'lib/stoplight/domain/config.rb', line 23

def cool_off_time_in_milliseconds
  (cool_off_time * 1_000).to_i
end

#with(name: T.undefined, cool_off_time: T.undefined, threshold: T.undefined, recovery_threshold: T.undefined, window_size: T.undefined, skipped_errors: T.undefined, tracked_errors: T.undefined, traffic_control: T.undefined, traffic_recovery: T.undefined, error_notifier: T.undefined, notifiers: T.undefined, data_store: T.undefined) ⇒ Object

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.

API:

  • private



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/stoplight/domain/config.rb', line 27

def with(
  name: T.undefined,
  cool_off_time: T.undefined,
  threshold: T.undefined,
  recovery_threshold: T.undefined,
  window_size: T.undefined,
  skipped_errors: T.undefined,
  tracked_errors: T.undefined,
  traffic_control: T.undefined,
  traffic_recovery: T.undefined,
  error_notifier: T.undefined,
  notifiers: T.undefined,
  data_store: T.undefined
)
  super(
    name: name.is_a?(Undefined) ? self.name : name,
    cool_off_time: cool_off_time.is_a?(Undefined) ? self.cool_off_time : cool_off_time,
    threshold: threshold.is_a?(Undefined) ? self.threshold : threshold,
    recovery_threshold: recovery_threshold.is_a?(Undefined) ? self.recovery_threshold : recovery_threshold,
    window_size: window_size.is_a?(Undefined) ? self.window_size : window_size,
    skipped_errors: skipped_errors.is_a?(Undefined) ? self.skipped_errors : skipped_errors,
    tracked_errors: tracked_errors.is_a?(Undefined) ? self.tracked_errors : tracked_errors,
    traffic_control: traffic_control.is_a?(Undefined) ? self.traffic_control : traffic_control,
    traffic_recovery: traffic_recovery.is_a?(Undefined) ? self.traffic_recovery : traffic_recovery,
    error_notifier: error_notifier.is_a?(Undefined) ? self.error_notifier : error_notifier,
    notifiers: notifiers.is_a?(Undefined) ? self.notifiers : notifiers,
    data_store: data_store.is_a?(Undefined) ? self.data_store : data_store,
  )
end