move the option

This commit is contained in:
Asim 2016-05-26 20:43:05 +01:00
parent ee3ae89ca8
commit 7a5a9013ef

View File

@ -42,6 +42,14 @@ type SubscriberOptions struct {
Internal bool Internal bool
} }
// EndpointMetadata is a Handler option that allows metadata to be added to
// individual endpoints.
func EndpointMetadata(name string, md map[string]string) HandlerOption {
return func(o *HandlerOptions) {
o.Metadata[name] = md
}
}
// Internal Handler options specifies that a handler is not advertised // Internal Handler options specifies that a handler is not advertised
// to the discovery system. In the future this may also limit request // to the discovery system. In the future this may also limit request
// to the internal network or authorised user. // to the internal network or authorised user.
@ -51,14 +59,6 @@ func InternalHandler(b bool) HandlerOption {
} }
} }
// EndpointMetadata is a Handler option that allows metadata to be added to
// individual endpoints.
func EndpointMetadata(name string, md map[string]string) HandlerOption {
return func(o *HandlerOptions) {
o.Metadata[name] = md
}
}
// Internal Subscriber options specifies that a subscriber is not advertised // Internal Subscriber options specifies that a subscriber is not advertised
// to the discovery system. // to the discovery system.
func InternalSubscriber(b bool) SubscriberOption { func InternalSubscriber(b bool) SubscriberOption {