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

support use of listen options (#2536)

* feat: support use of listen options

* style: Adjust the import order of packages.
This commit is contained in:
Arvin
2022-07-30 17:56:14 +08:00
committed by GitHub
parent adcc1761d0
commit 63a9b94820
8 changed files with 246 additions and 16 deletions

View File

@@ -304,6 +304,13 @@ func WrapSubscriber(w ...server.SubscriberWrapper) Option {
}
}
// Add opt to server option
func AddListenOption(option server.Option) Option {
return func(o *Options) {
o.Server.Init(option)
}
}
// Before and Afters
// BeforeStart run funcs before service starts