diff --git a/server/handler.go b/server/handler.go index 79543b8b..5e81e5c3 100644 --- a/server/handler.go +++ b/server/handler.go @@ -42,6 +42,14 @@ type SubscriberOptions struct { 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 // to the discovery system. In the future this may also limit request // 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 // to the discovery system. func InternalSubscriber(b bool) SubscriberOption {