File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,8 @@ func (cl *Client) OptValues(opt any) []any {
248
248
return []any {cfg .dialFn }
249
249
case namefn (DialTLSConfig ):
250
250
return []any {cfg .dialTLS }
251
+ case namefn (DialTLS ):
252
+ return []any {cfg .dialTLS != nil }
251
253
case namefn (SeedBrokers ):
252
254
return []any {cfg .seedBrokers }
253
255
case namefn (MaxVersions ):
Original file line number Diff line number Diff line change @@ -642,6 +642,12 @@ func DialTLSConfig(c *tls.Config) Opt {
642
642
return clientOpt {func (cfg * cfg ) { cfg .dialTLS = c }}
643
643
}
644
644
645
+ // DialTLS opts into dialing brokers with TLS. This is a shortcut for
646
+ // DialTLSConfig with an empty config. See DialTLSConfig for more details.
647
+ func DialTLS () Opt {
648
+ return DialTLSConfig (new (tls.Config ))
649
+ }
650
+
645
651
// SeedBrokers sets the seed brokers for the client to use, overriding the
646
652
// default 127.0.0.1:9092.
647
653
//
You can’t perform that action at this time.
0 commit comments