Skip to content

Instantly share code, notes, and snippets.

@laser
Created April 14, 2014 17:43
Show Gist options
  • Save laser/10668643 to your computer and use it in GitHub Desktop.
Save laser/10668643 to your computer and use it in GitHub Desktop.
10: Rails client using Redis
# config/initializers/services.rb
require 'barrister-rails'
require 'barrister-redis'
class Services
# ...
def self.proxy_services
opts = { database_url: ENV['OPENREDIS_URL'] }
transport = Barrister::RedisTransport.new 'user_service', opts
client = Barrister::Rails::Client.new transport
{ user_service: client.UserService }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment