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()
|
|
|
|
|
|
|
|
fatalOnErr(serveGRPC(c))
|
|
|
|
|
2020-08-21 11:32:03 +00:00
|
|
|
ctx := grace.NewGracefulContext(nil)
|
2020-07-10 14:17:51 +00:00
|
|
|
|
2020-08-21 11:32:03 +00:00
|
|
|
<-ctx.Done()
|
2020-07-10 14:17:51 +00:00
|
|
|
}
|