Class: Bosh::Blobstore::RetryableBlobstoreClient
- Inherits:
-
BaseClient
- Object
- Client
- BaseClient
- Bosh::Blobstore::RetryableBlobstoreClient
- Extended by:
- Forwardable
- Defined in:
- lib/blobstore_client/retryable_blobstore_client.rb
Constant Summary
Constants inherited from Client
Client::PROVIDER_NAMES, Client::VERSION
Instance Method Summary collapse
- #get(id, file = nil, options = {}) ⇒ Object
-
#initialize(client, retryable) ⇒ RetryableBlobstoreClient
constructor
A new instance of RetryableBlobstoreClient.
Methods inherited from BaseClient
Methods inherited from Client
Constructor Details
#initialize(client, retryable) ⇒ RetryableBlobstoreClient
Returns a new instance of RetryableBlobstoreClient.
8 9 10 11 |
# File 'lib/blobstore_client/retryable_blobstore_client.rb', line 8 def initialize(client, retryable) @client = client @retryable = retryable end |
Instance Method Details
#get(id, file = nil, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/blobstore_client/retryable_blobstore_client.rb', line 13 def get(id, file = nil, = {}) # BoshRetryable#retryer interface does not allow nil # as a successful return value; hence, we save off last result last_result = nil @retryable.retryer do last_result = @client.get(id, file, ) true end last_result end |