Sha256: 932c78cc48dab6276b008ed674ed9a600d442bf5e8c26ba7730c746609a8e1b2

Contents?: true

Size: 1.17 KB

Versions: 36

Compression:

Stored size: 1.17 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 = {})
      session = option.use_current_session?(options)
      transaction = Janus::Transactions::Admin.new(session)
      transaction.connect { yield(transaction) }
    rescue
      raise Errors::RRJAdmin::StartTransactionAdmin, options
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.3.1.pre.201 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.1.pre.198 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0.pre.197 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0.pre.196 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0.pre.194 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0.pre.192 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.3.0.pre.170 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.2 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.1 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.1.pre.181 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.1.pre.180 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.179 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.177 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.173 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.170 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.168 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.167 lib/rrj/admin.rb
ruby_rabbitmq_janus-2.2.0.pre.166 lib/rrj/admin.rb