Sha256: 6f03d4a3adee979c959f70bec76561fb9c60279a6db75918e03a1c294049fd01
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
module MessageBus class HTTPClient module Configuration def self.included(base) base.send(:attr_accessor, :enable_long_polling, :status, :enable_chunked_encoding, :min_poll_interval, :max_poll_interval, :background_callback_interval ) end # @param enable_long_polling [Boolean] Enable long polling # @param enable_chunked_encoding [Boolean] Enable chunk encoding # @param min_poll_interval [Float, Integer] Min poll interval when long polling # @param max_poll_interval [Float, Integer] Max poll interval when long polling. # When requests fail, the client will backoff and this is the upper limit. # @param background_callback_interval [Float, Integer] Interval to poll when # when polling. # @param headers [Hash] extra HTTP headers to be set on the polling requests. def initialize(_base_url, enable_long_polling: true, enable_chunked_encoding: true, min_poll_interval: 0.1, max_poll_interval: 180, background_callback_interval: 60, headers: {}) @enable_long_polling = enable_long_polling @enable_chunked_encoding = enable_chunked_encoding @min_poll_interval = min_poll_interval @max_poll_interval = max_poll_interval @background_callback_interval = background_callback_interval @headers = headers end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
message_bus-http_client-1.0.0.pre1 | lib/message_bus/http_client/configuration.rb |