Add extra options to be used by others that need them
This commit is contained in:
@@ -87,7 +87,7 @@ func (h *httpTransportClient) Send(m *Message) error {
|
||||
|
||||
func (h *httpTransportClient) Recv(m *Message) error {
|
||||
var r *http.Request
|
||||
if !h.dialOpts.stream {
|
||||
if !h.dialOpts.Stream {
|
||||
rc, ok := <-h.r
|
||||
if !ok {
|
||||
return io.EOF
|
||||
|
||||
@@ -29,10 +29,16 @@ type Transport interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
type Options struct{}
|
||||
type Options struct {
|
||||
// Other options to be used by broker implementations
|
||||
Options map[string]string
|
||||
}
|
||||
|
||||
type DialOptions struct {
|
||||
stream bool
|
||||
Stream bool
|
||||
|
||||
// Other options to be used by broker implementations
|
||||
Options map[string]string
|
||||
}
|
||||
|
||||
type Option func(*Options)
|
||||
@@ -45,7 +51,7 @@ var (
|
||||
|
||||
func WithStream() DialOption {
|
||||
return func(o *DialOptions) {
|
||||
o.stream = true
|
||||
o.Stream = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user