Sha256: d8041b16d2a90e4a9fe325cf5d1400a91134f4214a02b5531006d215b1f33a82

Contents?: true

Size: 1.12 KB

Versions: 25

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>

  # # RubyRabbitmqJanus - RRJAdmin
  #
  # This class inherite to a classic initializer but it's used for
  # admin request sending to janus (Admin/Monitor API).
  #
  # **Is used just for sending a message to Janus Monitor/Admin API.**.
  # **The queue is always ***exclusive*** for not transmitting data to
  # anyone.**
  #
  # @see https://janus.conf.meetecho.com/docs/admin.html
  class RRJAdmin < RRJ
    # Create a transaction between apps and Janus for request without handle
    #
    # @param [Hash] options
    #   Give a session number for use another session in Janus
    #
    # @example Get Janus session
    #   @rrj.start_transaction_admin do |transaction|
    #     response = transaction.publish_message('admin:sessions').sessions
    #   end
    #
    # @since 2.0.0
    def start_transaction_admin(options = {})
      transaction = Janus::Transactions::Admin.new(options)
      transaction.connect { yield(transaction) }
    rescue
      raise Errors::RRJAdmin::StartTransactionAdmin, options
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.6.0 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.263 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.261 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.260 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.259 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.258 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.247 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.246 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.244 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.240 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.239 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.238 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.233 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.229 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.228 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.227 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.6.0.pre.226 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.5.1.pre.217 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.5.1 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.5.1.pre.215 lib/rrj/admin.rb