forked from TrueCloudLab/frostfs-node
[#11] Use gRPC handlers in neofs-node application
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
c2954aab20
commit
65eb1181e9
3 changed files with 87 additions and 57 deletions
|
@ -15,9 +15,11 @@ func fatalOnErr(err error) {
|
|||
func main() {
|
||||
c := defaultCfg()
|
||||
|
||||
fatalOnErr(serveGRPC(c))
|
||||
c.ctx = grace.NewGracefulContext(nil)
|
||||
|
||||
ctx := grace.NewGracefulContext(nil)
|
||||
serveGRPC(c)
|
||||
|
||||
<-ctx.Done()
|
||||
<-c.ctx.Done()
|
||||
|
||||
c.wg.Wait()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue