Allow unconfigured SASL

This commit is contained in:
Daniel Nelson
2019-07-25 16:19:09 -07:00
parent 4f34b08830
commit dd43774263
+3
View File
@@ -27,6 +27,9 @@ type SaramaSASL struct {
func (c *SASLConfig) SetSaramaSASLConfig(config *sarama.Config) error {
sasl := config.Net.SASL
switch c.SASLMechanism {
case "":
// SASL is not enabled
return nil
case "PLAIN":
sasl.Mechanism = sarama.SASLTypePlaintext
case "SCRAM-SHA-256":