2020-07-10 14:17:51 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-08-21 15:01:59 +00:00
|
|
|
"log"
|
|
|
|
|
2020-08-21 11:32:03 +00:00
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/util/grace"
|
2020-07-10 14:17:51 +00:00
|
|
|
)
|
|
|
|
|
2020-08-21 15:01:59 +00:00
|
|
|
func fatalOnErr(err error) {
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-10 14:17:51 +00:00
|
|
|
func main() {
|
2020-08-21 15:01:59 +00:00
|
|
|
c := defaultCfg()
|
|
|
|
|
2020-08-22 11:03:45 +00:00
|
|
|
c.ctx = grace.NewGracefulContext(nil)
|
2020-08-21 15:01:59 +00:00
|
|
|
|
2020-08-22 11:03:45 +00:00
|
|
|
serveGRPC(c)
|
2020-07-10 14:17:51 +00:00
|
|
|
|
2020-08-22 11:03:45 +00:00
|
|
|
<-c.ctx.Done()
|
|
|
|
|
|
|
|
c.wg.Wait()
|
2020-07-10 14:17:51 +00:00
|
|
|
}
|