A GRPC Server Runner for use with grace.
package main
import (
"context"
"github.com/tomwright/grace"
"github.com/tomwright/gracegrpcserverrunner"
"google.golang.org/grpc"
)
func main() {
g := grace.Init(context.Background())
// Create and configure your GRPC server.
server := grpc.NewServer()
// Create and configure the GRPC server runner.
runner := &gracegrpcserverrunner.GRPCServerRunner{
Server: server,
ListenAddress: ":9090",
}
// Run the runner.
g.Run(runner)
g.Wait()
}