Class: Api::Clients::Cortex
- Inherits:
-
Object
- Object
- Api::Clients::Cortex
- Defined in:
- lib/api/clients/cortex.rb
Constant Summary collapse
- CORTEX_API =
"https://api.cortex.sportradar.ag/api/v1"
- GITLAB_URL =
"https://gitlab.sportradar.ag/"
- API_KEY =
ENV["CORTEX_API_KEY"]
Instance Attribute Summary collapse
-
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
Instance Method Summary collapse
-
#check_service ⇒ Object
Public: check gitlab info in cortex service.
-
#initialize(gitlab_url:) ⇒ Cortex
constructor
Public: - gitlab_url: gitlab project url.
-
#service ⇒ Object
Public: service tag in cortex.yaml.
-
#service_info ⇒ Object
Public: read the service info on cortex.
Constructor Details
#initialize(gitlab_url:) ⇒ Cortex
Public:
-
gitlab_url: gitlab project url
21 22 23 |
# File 'lib/api/clients/cortex.rb', line 21 def initialize(gitlab_url:) @gitlab_url = gitlab_url end |
Instance Attribute Details
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
12 13 14 |
# File 'lib/api/clients/cortex.rb', line 12 def gitlab_url @gitlab_url end |
Instance Method Details
#check_service ⇒ Object
Public: check gitlab info in cortex service
36 37 38 39 |
# File 'lib/api/clients/cortex.rb', line 36 def check_service service_has_gitlab_info? # post_call post_service_url, post_body end |
#service ⇒ Object
Public: service tag in cortex.yaml
26 27 28 |
# File 'lib/api/clients/cortex.rb', line 26 def service @service ||= config["info"]["x-cortex-tag"] end |
#service_info ⇒ Object
Public: read the service info on cortex
31 32 33 |
# File 'lib/api/clients/cortex.rb', line 31 def service_info @service_info ||= get_call(get_service_url) end |