func (p *prometheus) Retrieve(sli *monitoringv1alpha1.SLI) (Result, error) {
	cli, err := p.cliFactory.GetV1APIClient(sli.Prometheus.Address)
	if err != nil {
		return Result{}, err
	}
	res := Result{}
	promclictx, cancel := context.WithTimeout(context.Background(), promCliTimeout)
	defer cancel()
	g, ctx := errgroup.WithContext(promclictx)
	g.Go(func() error {
		res.TotalQ, err = p.getVectorMetric(ctx, cli, sli.Prometheus.TotalQuery)
		return err
	})
	g.Go(func() error {
		res.ErrorQ, err = p.getVectorMetric(ctx, cli, sli.Prometheus.ErrorQuery)
		return err
	})
	err = g.Wait()
	if err != nil {
		return Result{}, err
	}
	return res, nil
}
Retrieve satisfies Service interface..
package sli
import (
	"context"
	"fmt"
	"time"
	"golang.org/x/sync/errgroup"
	promv1 "github.com/prometheus/client_golang/api/prometheus/v1"
	"github.com/prometheus/common/model"
	monitoringv1alpha1 "github.com/spotahome/service-level-operator/pkg/apis/monitoring/v1alpha1"
	"github.com/spotahome/service-level-operator/pkg/log"
	promcli "github.com/spotahome/service-level-operator/pkg/service/client/prometheus"
)
const promCliTimeout = 2 * time.Second
type prometheus struct {
	cliFactory promcli.ClientFactory
	logger     log.Logger
}
func NewPrometheus(promCliFactory promcli.ClientFactory, logger log.Logger) Retriever {
	return &prometheus{
		cliFactory: promCliFactory,
		logger:     logger,
	}
}