Class: Aliyun::Odps::TunnelRouter

Inherits:
Object
  • Object
show all
Defined in:
lib/aliyun/odps/tunnel/router.rb

Class Method Summary collapse

Class Method Details

.get_tunnel_endpoint(client, project_name) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'lib/aliyun/odps/tunnel/router.rb', line 4

def self.get_tunnel_endpoint(client, project_name)
  host = client.get(
    "/projects/#{project_name}/tunnel",
    query: { service: true, curr_project: project_name }
  ).parsed_response
  "#{Aliyun::Odps.config.protocol}://#{host}"
rescue RequestError
  nil
end