Sha256: 9e7155d12003f380d75f8a557c5b07c487e71315f2d9b07339a6962d8df4bb66
Contents?: true
Size: 674 Bytes
Versions: 11
Compression:
Stored size: 674 Bytes
Contents
module Kafka module Protocol # SaslHandshake Request (Version: 0) => mechanism # mechanism => string class SaslHandshakeRequest SUPPORTED_MECHANISMS = %w(GSSAPI PLAIN) def initialize(mechanism) unless SUPPORTED_MECHANISMS.include?(mechanism) raise Kafka::Error, "Unsupported SASL mechanism #{mechanism}. Supported are #{SUPPORTED_MECHANISMS.join(', ')}" end @mechanism = mechanism end def api_key SASL_HANDSHAKE_API end def response_class SaslHandshakeResponse end def encode(encoder) encoder.write_string(@mechanism) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems