fix: kafka tls config
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package kafka
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"ultone/internal/interfaces"
|
||||
|
||||
"github.com/segmentio/kafka-go/sasl/plain"
|
||||
@@ -14,6 +15,14 @@ func WithPlainAuth(username, password string) OptionFn {
|
||||
Username: username,
|
||||
Password: password,
|
||||
}
|
||||
c.d.SASLMechanism = c.mechanism
|
||||
}
|
||||
}
|
||||
|
||||
func WithTLS(config *tls.Config) OptionFn {
|
||||
return func(c *client) {
|
||||
c.tls = config
|
||||
c.d.TLS = config
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user