(workerIP string)
| 50 | } |
| 51 | |
| 52 | func End(workerIP string) bool { |
| 53 | conn, err := grpc.Dial(workerIP, grpc.WithInsecure()) |
| 54 | if err != nil { |
| 55 | log.Warn(err) |
| 56 | return false |
| 57 | } |
| 58 | defer conn.Close() |
| 59 | c := rpc.NewWorkerClient(conn) |
| 60 | |
| 61 | ctx, cancel := context.WithTimeout(context.Background(), time.Second) |
| 62 | defer cancel() |
| 63 | |
| 64 | c.End(ctx, &rpc.Empty{}) |
| 65 | |
| 66 | return true |
| 67 | } |
| 68 | |
| 69 | func Health(workerIP string) int { |
| 70 | conn, err := grpc.Dial(workerIP, grpc.WithInsecure()) |
no test coverage detected