code: func (g *GRPCServer) SendKeepAlives(stream proto.AuthService_SendKeepAlivesServer) error {
  	defer stream.SendAndClose(&empty.Empty{})
  	auth, err := g.authenticate(stream.Context())
  	if err != nil {
  		return trail.ToGRPC(err)
  	}
  	g.Debugf("Got heartbeat connection from %v.", auth.User.GetName())
  	for {
  		keepAlive, err := stream.Recv()
  		if err == io.EOF {
  			g.Debugf("Connection closed.")
  			return nil
  		}
  		if err != nil {
  			g.Debugf("Failed to receive heartbeat: %v", err)
  			return trail.ToGRPC(err)
  		}
  		err = auth.KeepAliveNode(stream.Context(), *keepAlive)
  		if err != nil {
  			return trail.ToGRPC(err)
  		}
  	}
  }
docs: // SendKeepAlives allows node to send a stream of keep alive requests