Class: Bosh::Blobstore::AtmosBlobstoreClient
- Inherits:
-
BaseClient
- Object
- Client
- BaseClient
- Bosh::Blobstore::AtmosBlobstoreClient
- Defined in:
- lib/blobstore_client/atmos_blobstore_client.rb
Constant Summary collapse
- SHARE_URL_EXP =
expires on 2030 Jan-1
'1893484800'
Constants inherited from Client
Client::PROVIDER_NAMES, Client::VERSION
Instance Method Summary collapse
- #atmos_server ⇒ Object
-
#initialize(options) ⇒ AtmosBlobstoreClient
constructor
A new instance of AtmosBlobstoreClient.
Methods inherited from BaseClient
#create, #delete, #exists?, #get
Methods inherited from Client
Constructor Details
#initialize(options) ⇒ AtmosBlobstoreClient
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/blobstore_client/atmos_blobstore_client.rb', line 13 def initialize() super() = { url: [:url], uid: [:uid], secret: [:secret] } @tag = [:tag] if [:unsupported] [:unsupported] = [:unsupported] end # Add proxy if ENV has the variable proxy = case URI.parse([:url] || '').scheme when 'https' ENV['HTTPS_PROXY'] || ENV['https_proxy'] when 'http' ENV['HTTP_PROXY'] || ENV['http_proxy'] else nil end if proxy [:proxy] = proxy @http_client = HTTPClient.new(proxy: proxy) end @http_client ||= HTTPClient.new @http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE end |
Instance Method Details
#atmos_server ⇒ Object
43 44 45 46 47 |
# File 'lib/blobstore_client/atmos_blobstore_client.rb', line 43 def atmos_server raise 'Atmos password is missing (read-only mode)' unless [:secret] @atmos ||= Atmos::Store.new() end |