1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-23 21:44:41 +02:00

make router configurable in api

This commit is contained in:
Asim Aslam
2022-07-02 14:15:02 +01:00
parent 73dc3723c7
commit e313863a2a
3 changed files with 24 additions and 5 deletions

View File

@@ -19,8 +19,12 @@ type api struct {
func newApi(opts ...Option) Api {
options := NewOptions(opts...)
// TODO: make configurable
rtr := registry.NewRouter()
rtr := options.Router
if rtr == nil {
// TODO: make configurable
rtr = registry.NewRouter()
}
// TODO: make configurable
hdlr := rpc.NewHandler(