diff --git a/server/noop.go b/server/noop.go index 7547f934..bede5f71 100644 --- a/server/noop.go +++ b/server/noop.go @@ -160,21 +160,15 @@ func (n *noopServer) Register() error { n.RLock() // Maps are ordered randomly, sort the keys for consistency var handlerList []string - for n, e := range n.handlers { - // Only advertise non internal handlers - if !e.Options().Internal { - handlerList = append(handlerList, n) - } + for n, _ := range n.handlers { + handlerList = append(handlerList, n) } sort.Strings(handlerList) var subscriberList []*subscriber for e := range n.subscribers { - // Only advertise non internal subscribers - if !e.Options().Internal { - subscriberList = append(subscriberList, e) - } + subscriberList = append(subscriberList, e) } sort.Slice(subscriberList, func(i, j int) bool { return subscriberList[i].topic > subscriberList[j].topic diff --git a/server/options.go b/server/options.go index 7452bbbf..522d261a 100644 --- a/server/options.go +++ b/server/options.go @@ -325,8 +325,6 @@ type HandlerOptions struct { Context context.Context // Metadata for hondler Metadata map[string]metadata.Metadata - // Internal flag limits exporting to other nodes via register - Internal bool } // NewHandlerOptions creates new HandlerOptions @@ -354,8 +352,6 @@ type SubscriberOptions struct { Queue string // AutoAck flag for auto ack messages after processing AutoAck bool - // Internal flag limit exporting info via register - Internal bool // BodyOnly flag specifies that message without headers BodyOnly bool } @@ -382,23 +378,6 @@ func EndpointMetadata(name string, md metadata.Metadata) HandlerOption { } } -// InternalHandler options specifies that a handler is not advertised -// to the discovery system. In the future this may also limit request -// to the internal network or authorised user. -func InternalHandler(b bool) HandlerOption { - return func(o *HandlerOptions) { - o.Internal = b - } -} - -// InternalSubscriber options specifies that a subscriber is not advertised -// to the discovery system. -func InternalSubscriber(b bool) SubscriberOption { - return func(o *SubscriberOptions) { - o.Internal = b - } -} - // DisableAutoAck will disable auto acking of messages // after they have been handled. func DisableAutoAck() SubscriberOption {