Class: Aliyun::Opensearch::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/aliyun/opensearch/configuration.rb

Overview

服务配置

Author:

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.access_key_idObject

阿里云申请的ak



13
14
15
# File 'lib/aliyun/opensearch/configuration.rb', line 13

def access_key_id
  @access_key_id
end

.access_key_secretObject

阿里云申请的ak secret



14
15
16
# File 'lib/aliyun/opensearch/configuration.rb', line 14

def access_key_secret
  @access_key_secret
end

.endpointObject

Opensearch服务地址



12
13
14
# File 'lib/aliyun/opensearch/configuration.rb', line 12

def endpoint
  @endpoint
end

Class Method Details

.opensearch_urlString

根据设置的endpoint获取服务的url, 如果没有协议头默认设置为https

Returns:

  • (String)

    服务url

Author:



23
24
25
# File 'lib/aliyun/opensearch/configuration.rb', line 23

def opensearch_url
  endpoint =~ /^https?:\/\// ? endpoint : "https://#{endpoint}"
end