Class: Config
- Inherits:
-
Object
- Object
- Config
- Defined in:
- lib/ff/ruby/server/sdk/api/config.rb
Constant Summary collapse
- @@min_frequency =
60
Instance Attribute Summary collapse
-
#all_attributes_private ⇒ Object
Returns the value of attribute all_attributes_private.
-
#analytics_enabled ⇒ Object
Returns the value of attribute analytics_enabled.
-
#buffer_size ⇒ Object
Returns the value of attribute buffer_size.
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#config_url ⇒ Object
Returns the value of attribute config_url.
-
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
-
#debugging ⇒ Object
Returns the value of attribute debugging.
-
#event_url ⇒ Object
Returns the value of attribute event_url.
-
#frequency ⇒ Object
Returns the value of attribute frequency.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#metrics_service_acceptable_duration ⇒ Object
Returns the value of attribute metrics_service_acceptable_duration.
-
#poll_interval_in_seconds ⇒ Object
Returns the value of attribute poll_interval_in_seconds.
-
#private_attributes ⇒ Object
Returns the value of attribute private_attributes.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#ssl_ca_cert ⇒ Object
Returns the value of attribute ssl_ca_cert.
-
#store ⇒ Object
Returns the value of attribute store.
-
#stream_enabled ⇒ Object
Returns the value of attribute stream_enabled.
-
#write_timeout ⇒ Object
Returns the value of attribute write_timeout.
Class Method Summary collapse
Instance Method Summary collapse
- #auth_settings ⇒ Object
- #base_url(args) ⇒ Object
- #cert_file ⇒ Object
- #client_side_validation ⇒ Object
- #describe ⇒ Object
- #get_frequency ⇒ Object
-
#initialize ⇒ Config
constructor
Static - End.
- #key_file ⇒ Object
- #params_encoding ⇒ Object
- #timeout ⇒ Object
- #verify_ssl ⇒ Object
- #verify_ssl_host ⇒ Object
Constructor Details
#initialize ⇒ Config
Static - End
24 25 26 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 56 57 58 59 60 61 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 24 def initialize super @config_url = "https://config.ff.harness.io/api/1.0" @event_url = "https://events.ff.harness.io/api/1.0" @stream_enabled = true @poll_interval_in_seconds = @@min_frequency @analytics_enabled = true @frequency = @@min_frequency @buffer_size = 10000 @all_attributes_private = false @private_attributes = Set[] @connection_timeout = 10 * 1000 @read_timeout = 30 * 1000 @write_timeout = 10 * 1000 @debugging = false @logger = Logger.new(STDOUT) @metrics_service_acceptable_duration = 10 * 1000 @cache = DefaultCache.new(@logger) # TODO: Storage goes here @store = nil end |
Instance Attribute Details
#all_attributes_private ⇒ Object
Returns the value of attribute all_attributes_private.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def all_attributes_private @all_attributes_private end |
#analytics_enabled ⇒ Object
Returns the value of attribute analytics_enabled.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def analytics_enabled @analytics_enabled end |
#buffer_size ⇒ Object
Returns the value of attribute buffer_size.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def buffer_size @buffer_size end |
#cache ⇒ Object
Returns the value of attribute cache.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def cache @cache end |
#config_url ⇒ Object
Returns the value of attribute config_url.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def config_url @config_url end |
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def connection_timeout @connection_timeout end |
#debugging ⇒ Object
Returns the value of attribute debugging.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def debugging @debugging end |
#event_url ⇒ Object
Returns the value of attribute event_url.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def event_url @event_url end |
#frequency ⇒ Object
Returns the value of attribute frequency.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def frequency @frequency end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def logger @logger end |
#metrics_service_acceptable_duration ⇒ Object
Returns the value of attribute metrics_service_acceptable_duration.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def metrics_service_acceptable_duration @metrics_service_acceptable_duration end |
#poll_interval_in_seconds ⇒ Object
Returns the value of attribute poll_interval_in_seconds.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def poll_interval_in_seconds @poll_interval_in_seconds end |
#private_attributes ⇒ Object
Returns the value of attribute private_attributes.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def private_attributes @private_attributes end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def read_timeout @read_timeout end |
#ssl_ca_cert ⇒ Object
Returns the value of attribute ssl_ca_cert.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def ssl_ca_cert @ssl_ca_cert end |
#store ⇒ Object
Returns the value of attribute store.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def store @store end |
#stream_enabled ⇒ Object
Returns the value of attribute stream_enabled.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def stream_enabled @stream_enabled end |
#write_timeout ⇒ Object
Returns the value of attribute write_timeout.
7 8 9 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 7 def write_timeout @write_timeout end |
Class Method Details
.min_frequency ⇒ Object
17 18 19 20 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 17 def min_frequency @@min_frequency end |
Instance Method Details
#auth_settings ⇒ Object
108 109 110 111 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 108 def auth_settings {} end |
#base_url(args) ⇒ Object
113 114 115 116 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 113 def base_url(args) @config_url end |
#cert_file ⇒ Object
88 89 90 91 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 88 def cert_file nil end |
#client_side_validation ⇒ Object
103 104 105 106 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 103 def client_side_validation nil end |
#describe ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 118 def describe to_s + "\n" + "\tmin_frequency = " + @@min_frequency.to_s + "\n" + "\tconfig_url = " + @config_url + "\n" + "\tevent_url = " + @event_url + "\n" + "\tstream_enabled = " + @stream_enabled.to_s + "\n" + "\tpoll_interval_in_seconds = " + @poll_interval_in_seconds.to_s + "\n" + "\tanalytics_enabled = " + @analytics_enabled.to_s + "\n" + "\tfrequency = " + @frequency.to_s + "\n" + "\tget_frequency = " + get_frequency.to_s + "\n" + "\tbuffer_size = " + @buffer_size.to_s + "\n" + "\tall_attributes_private = " + @all_attributes_private.to_s + "\n" + "\tprivate_attributes = " + @private_attributes.to_s + "\n" + "\tconnection_timeout = " + @connection_timeout.to_s + "\n" + "\tread_timeout = " + @read_timeout.to_s + "\n" + "\twrite_timeout = " + @write_timeout.to_s + "\n" + "\tdebug = " + @debugging.to_s + "\n" + "\tmetrics_service_acceptable_duration = " + @metrics_service_acceptable_duration.to_s + "\n" + "\tcache = " + @cache.to_s + "\n" + "\tstore = " + @store.to_s end |
#get_frequency ⇒ Object
63 64 65 66 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 63 def get_frequency [@frequency, @@min_frequency].max end |
#key_file ⇒ Object
93 94 95 96 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 93 def key_file nil end |
#params_encoding ⇒ Object
73 74 75 76 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 73 def params_encoding nil end |
#timeout ⇒ Object
78 79 80 81 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 78 def timeout @connection_timeout end |
#verify_ssl ⇒ Object
83 84 85 86 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 83 def verify_ssl true end |
#verify_ssl_host ⇒ Object
68 69 70 71 |
# File 'lib/ff/ruby/server/sdk/api/config.rb', line 68 def verify_ssl_host true end |