Update options to be public. This means people can implement the interfaces and actually use the options

This commit is contained in:
Asim
2015-12-31 18:11:46 +00:00
parent c2154fd5cc
commit 64b45f7846
17 changed files with 203 additions and 200 deletions

View File

@@ -28,6 +28,7 @@ type httpBroker struct {
id string
address string
unsubscribe chan *httpSubscriber
opts Options
sync.RWMutex
subscribers map[string][]*httpSubscriber
@@ -85,7 +86,7 @@ func (h *httpPublication) Topic() string {
return h.t
}
func (h *httpSubscriber) Config() SubscribeOptions {
func (h *httpSubscriber) Options() SubscribeOptions {
return h.opts
}
@@ -213,6 +214,10 @@ func (h *httpBroker) Init(opts ...Option) error {
return nil
}
func (h *httpBroker) Options() Options {
return h.opts
}
func (h *httpBroker) Publish(topic string, msg *Message, opts ...PublishOption) error {
s, err := registry.GetService("topic:" + topic)
if err != nil {