Transport init

This commit is contained in:
Asim
2016-03-15 22:25:32 +00:00
parent f088074f29
commit 5a6ff655db
7 changed files with 20 additions and 12 deletions

View File

@@ -8,6 +8,7 @@ import (
)
type Options struct {
Addrs []string
Secure bool
TLSConfig *tls.Config
@@ -37,6 +38,13 @@ type ListenOptions struct {
Context context.Context
}
// Addrs to use for transport
func Addrs(addrs ...string) Option {
return func(o *Options) {
o.Addrs = addrs
}
}
// Use secure communication. If TLSConfig is not specified we
// use InsecureSkipVerify and generate a self signed cert
func Secure(b bool) Option {