Class: Aliyun::Opensearch::Configuration
- Inherits:
-
Object
- Object
- Aliyun::Opensearch::Configuration
- Defined in:
- lib/aliyun/opensearch/configuration.rb
Overview
服务配置
Class Attribute Summary collapse
-
.access_key_id ⇒ Object
阿里云申请的ak.
-
.access_key_secret ⇒ Object
阿里云申请的ak secret.
-
.endpoint ⇒ Object
Opensearch服务地址.
Class Method Summary collapse
-
.opensearch_url ⇒ String
根据设置的endpoint获取服务的url, 如果没有协议头默认设置为https.
Class Attribute Details
.access_key_id ⇒ Object
阿里云申请的ak
13 14 15 |
# File 'lib/aliyun/opensearch/configuration.rb', line 13 def access_key_id @access_key_id end |
.access_key_secret ⇒ Object
阿里云申请的ak secret
14 15 16 |
# File 'lib/aliyun/opensearch/configuration.rb', line 14 def access_key_secret @access_key_secret end |
.endpoint ⇒ Object
Opensearch服务地址
12 13 14 |
# File 'lib/aliyun/opensearch/configuration.rb', line 12 def endpoint @endpoint end |
Class Method Details
.opensearch_url ⇒ String
根据设置的endpoint获取服务的url, 如果没有协议头默认设置为https
23 24 25 |
# File 'lib/aliyun/opensearch/configuration.rb', line 23 def opensearch_url endpoint =~ /^https?:\/\// ? endpoint : "https://#{endpoint}" end |