func (c *RefreshClient) RefreshWithRequestMetrics(ctx context.Context, config RefreshConfig, metrics map[charmmetrics.MetricKey]map[charmmetrics.MetricKey]string) ([]transport.RefreshResponse, error) {
	if c.logger.IsTraceEnabled() {
		c.logger.Tracef("RefreshWithRequestMetrics(%s, %+v)", pretty.Sprint(config), metrics)
	}
	req, err := config.Build()
	if err != nil {
		return nil, errors.Trace(err)
	}
	m, err := contextMetrics(metrics)
	if err != nil {
		return nil, errors.Trace(err)
	}
	req.Metrics = m
	return c.refresh(ctx, config.Ensure, req)
}
// RefreshWithRequestMetrics is to get refreshed charm data and provide metrics
// at the same time.  Used as part of the charm revision updater facade.
RefreshWithRequestMetrics is to get refreshed charm data and provide metrics
at the same time.  Used as part of the charm revision updater facade.
// RefreshWithRequestMetrics is to get refreshed charm data and provide metrics // at the same time . Used as part of the charm revision updater facade .
func (c *RefreshClient) RefreshWithRequestMetrics(ctx context.Context, config RefreshConfig, metrics map[charmmetrics.MetricKey]map[charmmetrics.MetricKey]string) ([]transport.RefreshResponse, error) {
	if c.logger.IsTraceEnabled() {
		c.logger.Tracef("RefreshWithRequestMetrics(%s, %+v)", pretty.Sprint(config), metrics)
	}
	req, err := config.Build()
	if err != nil {
		return nil, errors.Trace(err)
	}
	m, err := contextMetrics(metrics)
	if err != nil {
		return nil, errors.Trace(err)
	}
	req.Metrics = m
	return c.refresh(ctx, config.Ensure, req)
}
func ( c * RefreshClient ) RefreshWithRequestMetrics ( ctx context . Context , config RefreshConfig , metrics map [ charmmetrics . MetricKey ] map [ charmmetrics . MetricKey ] string ) ( [ ] transport . RefreshResponse , error ) { if c . logger . IsTraceEnabled ( ) { c . logger . Tracef ( " " , pretty . Sprint ( config ) , metrics ) } req , err := config . Build ( ) if err != nil { return nil , errors . Trace ( err ) } m , err := contextMetrics ( metrics ) if err != nil { return nil , errors . Trace ( err ) } req . Metrics = m return c . refresh ( ctx , config . Ensure , req ) }
RefreshWithRequestMetrics is to get refreshed charm data and provide metrics
at the same time.
RefreshWithRequestMetrics is to get refreshed charm data and provide metrics at the same time .