module EventStore::HTTP::Connect::Controls::IPAddress::Loopback::Alias::VerifyAll
Public Class Methods
call()
click to toggle source
# File lib/event_store/http/connect/controls/ip_address/loopback/alias.rb, line 21 def self.call port = Port::Unused.get unaliased_ip_addresses = list.select do |ip_address| begin server = TCPServer.new ip_address, port server.close false rescue Errno::EADDRNOTAVAIL true end end return true if unaliased_ip_addresses.none? warn <<~MESSAGE The following loopback aliases are not configured: #{unaliased_ip_addresses * "\n "} To setup a loopback alias, run the following command: sudo ifconfig lo0 alias 127.0.111.1 Note that the above command was tested on OS X and may vary on Linux systems. MESSAGE false end
list()
click to toggle source
# File lib/event_store/http/connect/controls/ip_address/loopback/alias.rb, line 52 def self.list [ Alias.example, *Cluster::IPAddress.list, *Cluster::IPAddress::Unavailable.list ] end