Class: Baidubce::BceClientConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/baidubce/bce_client_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials, endpoint, options = {}) ⇒ BceClientConfiguration

Returns a new instance of BceClientConfiguration.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/baidubce/bce_client_configuration.rb', line 31

def initialize(credentials,
               endpoint,
               options={})

    @credentials = credentials
    @endpoint = endpoint
    @protocol = options['protocol'] || DEFAULT_PROTOCOL
    @region = options['region'] || DEFAULT_REGION
    @open_timeout_in_millis = options['open_timeout_in_millis'] ||
        DEFAULT_OPEN_TIMEOUT_IN_MILLIS
    @read_timeout_in_millis = options['read_timeout_in_millis'] || DEFAULT_READ_TIMEOUT_IN_MILLIS
    @send_buf_size = options['send_buf_size'] || DEFAULT_SEND_BUF_SIZE
    @recv_buf_size = options['recv_buf_size'] || DEFAULT_RECV_BUF_SIZE
    @retry_policy = options['retry_policy'] || BackOffRetryPolicy.new
    @cname_enabled = options['cname_enabled'] || false
    @backup_endpoint = options['backup_endpoint']
end

Instance Attribute Details

#backup_endpointObject

Returns the value of attribute backup_endpoint.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def backup_endpoint
  @backup_endpoint
end

#cname_enabledObject

Returns the value of attribute cname_enabled.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def cname_enabled
  @cname_enabled
end

#credentialsObject

Returns the value of attribute credentials.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def credentials
  @credentials
end

#endpointObject

Returns the value of attribute endpoint.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def endpoint
  @endpoint
end

#open_timeout_in_millisObject

Returns the value of attribute open_timeout_in_millis.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def open_timeout_in_millis
  @open_timeout_in_millis
end

#protocolObject

Returns the value of attribute protocol.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def protocol
  @protocol
end

#read_timeout_in_millisObject

Returns the value of attribute read_timeout_in_millis.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def read_timeout_in_millis
  @read_timeout_in_millis
end

#recv_buf_sizeObject

Returns the value of attribute recv_buf_size.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def recv_buf_size
  @recv_buf_size
end

#regionObject

Returns the value of attribute region.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def region
  @region
end

#retry_policyObject

Returns the value of attribute retry_policy.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def retry_policy
  @retry_policy
end

#send_buf_sizeObject

Returns the value of attribute send_buf_size.



27
28
29
# File 'lib/baidubce/bce_client_configuration.rb', line 27

def send_buf_size
  @send_buf_size
end