Access tls config
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
Secure bool
|
||||
Secure bool
|
||||
TLSConfig *tls.Config
|
||||
|
||||
// Other options for implementations of the interface
|
||||
// can be stored in a context
|
||||
@@ -71,3 +74,10 @@ func Secure(b bool) Option {
|
||||
o.Secure = b
|
||||
}
|
||||
}
|
||||
|
||||
// Specify TLS Config
|
||||
func TLSConfig(t *tls.Config) Option {
|
||||
return func(o *Options) {
|
||||
o.TLSConfig = t
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user