Sha256: 55f9e1ccfa589219bff1d18c419cf3472050af24e4d9ed2fa7a56323a5da3328

Contents?: true

Size: 615 Bytes

Versions: 29

Compression:

Stored size: 615 Bytes

Contents

module Kafka
  module Protocol

    # SaslHandshake Response (Version: 0) => error_code [enabled_mechanisms]
    #  error_code => int16
    #  enabled_mechanisms => array of strings

    class SaslHandshakeResponse
      attr_reader :error_code

      attr_reader :enabled_mechanisms

      def initialize(error_code:, enabled_mechanisms:)
        @error_code = error_code
        @enabled_mechanisms = enabled_mechanisms
      end

      def self.decode(decoder)
        new(
          error_code: decoder.int16,
          enabled_mechanisms: decoder.array { decoder.string }
        )
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ruby-kafka-0.6.0.beta4 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.6.0.beta3 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.6.0.beta2 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.6.0.beta1 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.5 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.4 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.4.beta1 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.3 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.2 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.2.beta3 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.2.beta2 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.2.beta1 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.1 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.1.beta2 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.1.beta1 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.4.4 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.0 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.0.beta6 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.0.beta5 lib/kafka/protocol/sasl_handshake_response.rb
ruby-kafka-0.5.0.beta4 lib/kafka/protocol/sasl_handshake_response.rb