INNER CODE UNIT · Go
serverOptions
nicholasjackson/fake-service · main.go:423
serverOptions = append(serverOptions, grpc.KeepaliveParams(keepalive.ServerParameters{MaxConnectionAge: 5 * time.Second}))
}
//if *tlsCertificate != "" && *tlsKey != "" {
// creds, err := credentials.NewServerTLSFromFile(*tlsCertificate, *tlsKey)
// if err != nil {
// logger.Log().Error("Unable to load TLS certificate for gRPC server", "error", err)
// os.Exit(1)
// }
// serverOptions = append(serverOptions, grpc.Creds(creds))
//}
grpcServer := grpc.NewServer()
// register the reflection service which allows clients to determine the methods
// for this gRPC service
reflection.Register(grpcServer)