INNER CODE UNIT · Go
main
grpc-ecosystem/grpc-health-probe · main.go:245
func main() {
retcode := 0
defer func() { os.Exit(retcode) }()
ctx, cancel := context.WithCancel(context.Background())
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
sig := <-c
log.Printf("cancellation received (signal: %v)", sig)
cancel()
}()
opts := []grpc.DialOption{
grpc.WithUserAgent(flUserAgent),
grpc.WithBlock(),
}