Add transport options comments
This commit is contained in:
parent
d2d6841f02
commit
5f664faeba
@ -9,9 +9,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Addrs []string
|
// Addrs is the list of intermediary addresses to connect to
|
||||||
Codec codec.Marshaler
|
Addrs []string
|
||||||
Secure bool
|
// Codec is the codec interface to use where headers are not supported
|
||||||
|
// by the transport and the entire payload must be encoded
|
||||||
|
Codec codec.Marshaler
|
||||||
|
// Secure tells the transport to secure the connection.
|
||||||
|
// In the case TLSConfig is not specified best effort self-signed
|
||||||
|
// certs should be used
|
||||||
|
Secure bool
|
||||||
|
// TLSConfig to secure the connection. The assumption is that this
|
||||||
|
// is mTLS keypair
|
||||||
TLSConfig *tls.Config
|
TLSConfig *tls.Config
|
||||||
// Timeout sets the timeout for Send/Recv
|
// Timeout sets the timeout for Send/Recv
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
@ -21,7 +29,10 @@ type Options struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DialOptions struct {
|
type DialOptions struct {
|
||||||
Stream bool
|
// Tells the transport this is a streaming connection with
|
||||||
|
// multiple calls to send/recv and that send may not even be called
|
||||||
|
Stream bool
|
||||||
|
// Timeout for dialing
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
|
|
||||||
// TODO: add tls options when dialling
|
// TODO: add tls options when dialling
|
||||||
|
Loading…
Reference in New Issue
Block a user