Sha256: 9ed66c66bde8d5e7973caf7b3b639680f2c61aa225e1128241b99a395c25dba8
Contents?: true
Size: 371 Bytes
Versions: 1
Compression:
Stored size: 371 Bytes
Contents
require 'metaractor' require 'excon' module ConsulBridge class GetPrivateIP include Metaractor URL = 'http://169.254.169.254/latest/meta-data/local-ipv4'.freeze 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
consul_bridge-0.1.5 | lib/consul_bridge/get_private_ip.rb |