Class: ConsulBridge::GetPrivateIP
- Inherits:
-
Object
- Object
- ConsulBridge::GetPrivateIP
- Includes:
- Metaractor
- Defined in:
- lib/consul_bridge/get_private_ip.rb
Constant Summary collapse
- URL =
'http://169.254.169.254/latest/meta-data/local-ipv4'.freeze
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 |
# File 'lib/consul_bridge/get_private_ip.rb', line 10 def call response = Excon.get(URL, expects: [200], connect_timeout: 10, read_timeout: 10, write_timeout: 10, tcp_nodelay: true) context.private_ip = response.body end |