MCPcopy Create free account
hub / github.com/BWbwchen/MapReduce / End

Function End

master/rpcClient.go:52–67  ·  view source on GitHub ↗
(workerIP string)

Source from the content-addressed store, hash-verified

50}
51
52func 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
69func Health(workerIP string) int {
70 conn, err := grpc.Dial(workerIP, grpc.WithInsecure())

Callers 1

endWorkersMethod · 0.85

Calls 2

EndMethod · 0.95
NewWorkerClientFunction · 0.92

Tested by

no test coverage detected