From 41c7688697274ee4ee083693ab678cc596a5f53f Mon Sep 17 00:00:00 2001 From: ben-toogood Date: Thu, 2 Jul 2020 17:17:07 +0100 Subject: [PATCH] options: add router option (#1783) * broker/service: use wrapped micro client to authenticate requests * options: add router option * Revert "broker/service: use wrapped micro client to authenticate requests" This reverts commit f2383f37c86467b4ce534313a7f59993a904a712. --- options.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/options.go b/options.go index 8c1c7938..6cdee2be 100644 --- a/options.go +++ b/options.go @@ -195,6 +195,15 @@ func Runtime(r runtime.Runtime) Option { } } +// Router sets the router +func Router(r router.Router) Option { + return func(o *Options) { + o.Router = r + // Update client + o.Client.Init(client.Router(r)) + } +} + // Convenience options // Address sets the address of the server