Module: GameKit::Infra::Endpoint::ClassMethods

Defined in:
lib/game_kit/infra/endpoint.rb

Instance Method Summary collapse

Instance Method Details

#backend_url_for(service_name, subset: 'app', scheme: 'http') ⇒ Object



14
15
16
17
# File 'lib/game_kit/infra/endpoint.rb', line 14

def backend_url_for(service_name, subset: 'app', scheme: 'http')
  host = "#{scheme}://#{service_name}-#{subset}"
  host
end

#endpoint_for(game_id, host = nil, idc_env = nil) ⇒ Object



9
10
11
12
# File 'lib/game_kit/infra/endpoint.rb', line 9

def endpoint_for(game_id, host=nil, idc_env=nil)
  host = ENV['GW_HOST'] || host || 'http://localhost'
  "#{host}/game#{game_id}_app"
end