MCPcopy Create free account
hub / github.com/eth-easl/dirigent / ConnectToWorker

Method ConnectToWorker

internal/control_plane/workers/worker_node.go:111–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func (w *WorkerNode) ConnectToWorker() proto.WorkerNodeInterfaceClient {
112 if w.wnConnection == nil {
113 var err error
114
115 w.wnConnection, err = grpc_helpers.InitializeWorkerNodeConnection(w.IP, w.Port)
116 if err != nil {
117 logrus.Errorf("Failed to establish connection with the worker node.")
118 }
119 }
120
121 return w.wnConnection
122}
123
124func (w *WorkerNode) UpdateLastHearBeat() {
125 w.LastHeartbeat = time.Now()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected