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.
This commit is contained in:
ben-toogood
2020-07-02 17:17:07 +01:00
committed by GitHub
parent b021546c09
commit 41c7688697

View File

@@ -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