class Skein::Client

Public Class Methods

new(config: nil, connection: nil, context: nil) click to toggle source

Instance Methods =====================================================

Calls superclass method Skein::Connected::new
# File lib/skein/client.rb, line 27
def initialize(config: nil, connection: nil, context: nil)
  super(config: config, connection: connection, context: context)
end
publisher(*args) click to toggle source
# File lib/skein/client.rb, line 17
def self.publisher(*args)
  new.publisher(*args)
end
rpc(*args) click to toggle source

Class Methods ========================================================

# File lib/skein/client.rb, line 9
def self.rpc(*args)
  new.rpc(*args)
end
subscriber(*args) click to toggle source
# File lib/skein/client.rb, line 21
def self.subscriber(*args)
  new.subscriber(*args)
end
worker(*args) click to toggle source
# File lib/skein/client.rb, line 13
def self.worker(*args)
  new.worker(*args)
end

Public Instance Methods

publisher(exchange_name, type: nil, durable: nil) click to toggle source
# File lib/skein/client.rb, line 55
def publisher(exchange_name, type: nil, durable: nil)
  Skein::Client::Publisher.new(
    exchange_name,
    type: type,
    durable: durable,
    connection: self.connection,
    context: self.context
  )
end
rpc(exchange_name = nil, routing_key: nil, ident: nil, expiration: nil, persistent: nil, durable: nil, timeout: nil) click to toggle source
# File lib/skein/client.rb, line 31
def rpc(exchange_name = nil, routing_key: nil, ident: nil, expiration: nil, persistent: nil, durable: nil, timeout: nil)
  Skein::Client::RPC.new(
    exchange_name,
    routing_key: routing_key,
    connection: self.connection,
    context: self.context,
    ident: ident,
    expiration: expiration,
    persistent: persistent,
    durable: durable,
    timeout: timeout
  )
end
subscriber(exchange_name, routing_key = nil) click to toggle source
# File lib/skein/client.rb, line 65
def subscriber(exchange_name, routing_key = nil)
  Skein::Client::Subscriber.new(
    exchange_name,
    routing_key,
    connection: self.connection,
    context: self.context
  )
end
worker(queue_name, type = nil, ident: nil, durable: nil) click to toggle source
# File lib/skein/client.rb, line 45
def worker(queue_name, type = nil, ident: nil, durable: nil)
  (type || Skein::Client::Worker).new(
    queue_name,
    connection: self.connection,
    context: self.context,
    ident: ident,
    durable: durable
  )
end