Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 409 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 409 Bytes

grenache-ruby-base

Configuration

Grenache::Base.configure do |conf|
    conf.grape_address = "ws://10.0.0.1:30002"
end

Usage

Announce a service

c = Grenache::Base.new

c.announce("test",30000) do |response|
  #service code
  puts "announce sent: #{response}"
end

lookup for a service

c.lookup('test') do |response|
  puts "services: #{response[1]}"
end