package reactor import ( "context" "fmt" //"FRMS/internal/pkg/logging" //"google.golang.org/grpc" pb "FRMS/internal/pkg/grpc" ) // implements grpc handler and device data aggregater handler // grpc status update handler func (c *ReactorCoordinator) Ping() { // sends all device status to central coordinator fmt.Printf("Pinging coordinator\n") // get devices devices, err := c.GetDevices() if err != nil { c.Err <- err } req := &pb.ReactorStatusPing{Id: int32(c.ID), Devices: devices} if _, err := c.MonitoringClient.ReactorStatusHandler(context.Background(), req); err != nil { c.Err <- err } }