NewSubscribeOptions

This commit is contained in:
Asim Aslam 2018-11-30 17:32:48 +00:00
parent c622f3a8d6
commit 92082ac927
2 changed files with 2 additions and 2 deletions

View File

@ -523,7 +523,7 @@ func (h *httpBroker) Publish(topic string, msg *Message, opts ...PublishOption)
} }
func (h *httpBroker) Subscribe(topic string, handler Handler, opts ...SubscribeOption) (Subscriber, error) { func (h *httpBroker) Subscribe(topic string, handler Handler, opts ...SubscribeOption) (Subscriber, error) {
options := newSubscribeOptions(opts...) options := NewSubscribeOptions(opts...)
// parse address for host, port // parse address for host, port
parts := strings.Split(h.Address(), ":") parts := strings.Split(h.Address(), ":")

View File

@ -50,7 +50,7 @@ var (
registryKey = contextKeyT("github.com/micro/go-micro/registry") registryKey = contextKeyT("github.com/micro/go-micro/registry")
) )
func newSubscribeOptions(opts ...SubscribeOption) SubscribeOptions { func NewSubscribeOptions(opts ...SubscribeOption) SubscribeOptions {
opt := SubscribeOptions{ opt := SubscribeOptions{
AutoAck: true, AutoAck: true,
} }