class Aggro::LocalNode

Public: Represents the local aggro server node.

Public Instance Methods

client() click to toggle source
# File lib/aggro/local_node.rb, line 4
def client
  @client ||= create_loopback_client
end
endpoint() click to toggle source
# File lib/aggro/local_node.rb, line 8
def endpoint
  "tcp://*:#{Aggro.port}"
end
publisher_endpoint() click to toggle source
# File lib/aggro/local_node.rb, line 12
def publisher_endpoint
  "tcp://*:#{Aggro.publisher_port}"
end
to_s() click to toggle source
# File lib/aggro/local_node.rb, line 16
def to_s
  id
end

Private Instance Methods

create_loopback_client() click to toggle source
# File lib/aggro/local_node.rb, line 22
def create_loopback_client
  ->(msg) { Aggro.server.handle_message msg }.tap do |proc|
    proc.class_eval { alias_method :post, :call }
  end
end