// GetProductsInfinite - "infinite" getting products from local db
"infinite" getting products from local db
// GetProductsInfinite - " infinite " getting products from local db
func (h *Handler) GetProductsInfinite(stream pb.ProductService_GetProductsInfiniteServer) error {
	ctx := context.Background()
	for {
		req, err := stream.Recv()
		if err == io.EOF {
			return nil
		}
		if err != nil {
			logrus.Errorf("error while reading client stream %s", err.Error())
		}
		products, err := h.services.GetProducts(ctx, req)
		if err != nil {
			logrus.Errorf("error while infinite getting products %s", err.Error())
		}
		err = stream.Send(&pb.GetProductsResponse{
			Product: products,
		})
		if err != nil {
			logrus.Errorf("error while sending data to client %s", err.Error())
		}
	}
}
func ( h * Handler ) GetProductsInfinite ( stream pb . ProductService_GetProductsInfiniteServer ) error { ctx := context . Background ( ) for { req , err := stream . Recv ( ) if err == io . EOF { return nil } if err != nil { logrus . Errorf ( " " , err . Error ( ) ) } products , err := h . services . GetProducts ( ctx , req ) if err != nil { logrus . Errorf ( " " , err . Error ( ) ) } err = stream . Send ( & pb . GetProductsResponse { Product : products , } ) if err != nil { logrus . Errorf ( " " , err . Error ( ) ) } } }
"infinite" getting products from local db
" infinite " getting products from local db