// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise.
184734
func (s *StatusEvent) GetTargetURL() string {
	if s == nil || s.TargetURL == nil {
		return ""
	}
	return *s.TargetURL
}
950675
func (cr *Context) GetTarget() *Surface {
	ret := wrapSurface(C.cairo_get_target(cr.Ptr))
	if err := cr.status(); err != nil {
		panic(err)
	}
	return ret
}
1196348
func (m *Metric) GetURL() string {
	if m == nil || m.URL == nil {
		return ""
	}
	return *m.URL
}
579097
func (launcher *Launcher) GetTarget() string {
	launcher.Mutex.RLock()
	arg := launcher.target
	launcher.Mutex.RUnlock()
	return arg
}
706161
func (s *PublishInput) SetTargetArn(v string) *PublishInput {
	s.TargetArn = &v
	return s
}
192362
func (gce *Cloud) GetTargetHTTPSProxy(name string) (*compute.TargetHttpsProxy, error) {
	return gce.service.TargetHttpsProxies.Get(gce.projectID, name).Do()
}
788956
func (shopify *Shopify) createTargetURL(endpoint string) string {
	result := fmt.Sprintf("https://%s:%s@%s%s/%s.json", shopify.apiKey, shopify.pass, shopify.store, domain, endpoint)
	return result
}
622635
func (c *Commit) GetURL() string {
	if c == nil || c.URL == nil {
		return ""
	}
	return *c.URL
}
190213
func (s *ScraperService) AddTarget(ctx context.Context, target *platform.ScraperTarget) error {
	url, err := newURL(s.Addr, targetPath)
	if err != nil {
		return err
	}

	octets, err := json.Marshal(target)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", url.String(), bytes.NewReader(octets))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", "application/json")
	SetToken(s.Token, req)

	hc := newClient(url.Scheme, s.InsecureSkipVerify)

	resp, err := hc.Do(req)
	if err != nil {
		return err
	}

	// TODO(jsternberg): Should this check for a 201 explicitly?
	if err := CheckError(resp, true); err != nil {
		return err
	}

	targetResp := new(targetResponse)
	if err := json.NewDecoder(resp.Body).Decode(targetResp); err != nil {
		return err
	}

	return nil
}
309251
func (m *Migration) GetURL() string {
	if m == nil || m.URL == nil {
		return ""
	}
	return *m.URL
}
901344
func (r *repository) GetTargetByName(name string, roles ...data.RoleName) (*TargetWithRole, error) {
	if err := r.updateTUF(false); err != nil {
		return nil, err
	}
	return NewReadOnly(r.tufRepo).GetTargetByName(name, roles...)
}
101905
func (s *Server) getTargetsLocal(ctx context.Context, reqs []models.Req) ([]models.Series, error) {
	log.Debugf("DP getTargetsLocal: handling %d reqs locally", len(reqs))
	responses := make(chan getTargetsResp, len(reqs))

	var wg sync.WaitGroup
	reqLimiter := util.NewLimiter(getTargetsConcurrency)

	rCtx, cancel := context.WithCancel(ctx)
	defer cancel()
LOOP:
	for _, req := range reqs {
		// if there are already getDataConcurrency goroutines running, then block
		// until a slot becomes free or our context is canceled.
		if !reqLimiter.Acquire(rCtx) {
			//request canceled
			break LOOP
		}
		wg.Add(1)
		go func(req models.Req) {
			rCtx, span := tracing.NewSpan(rCtx, s.Tracer, "getTargetsLocal")
			req.Trace(span)
			pre := time.Now()
			points, interval, err := s.getTarget(rCtx, req)
			if err != nil {
				tags.Error.Set(span, true)
				cancel() // cancel all other requests.
				responses <- getTargetsResp{nil, err}
			} else {
				getTargetDuration.Value(time.Now().Sub(pre))
				responses <- getTargetsResp{[]models.Series{{
					Target:       req.Target, // always simply the metric name from index
					Datapoints:   points,
					Interval:     interval,
					QueryPatt:    req.Pattern, // foo.* or foo.bar whatever the etName arg was
					QueryFrom:    req.From,
					QueryTo:      req.To,
					QueryCons:    req.ConsReq,
					Consolidator: req.Consolidator,
				}}, nil}
			}
			wg.Done()
			// pop an item of our limiter so that other requests can be processed.
			reqLimiter.Release()
			span.Finish()
		}(req)
	}
	go func() {
		wg.Wait()
		close(responses)
	}()
	out := make([]models.Series, 0, len(reqs))
	for resp := range responses {
		if resp.err != nil {
			return nil, resp.err
		}
		out = append(out, resp.series...)
	}
	log.Debugf("DP getTargetsLocal: %d series found locally", len(out))
	return out, nil

}
593379
func (s *SnsAction) SetTargetArn(v string) *SnsAction {
	s.TargetArn = &v
	return s
}
522859
func (m *Membership) GetURL() string {
	if m == nil || m.URL == nil {
		return ""
	}
	return *m.URL
}
1310736
func (c *Client) GetTargetByID(ctx context.Context, id influxdb.ID) (target *influxdb.ScraperTarget, err error) {
	var pe *influxdb.Error
	err = c.db.View(func(tx *bolt.Tx) error {
		target, pe = c.findTargetByID(ctx, tx, id)
		if pe != nil {
			return &influxdb.Error{
				Op:  getOp(influxdb.OpGetTargetByID),
				Err: pe,
			}
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return target, nil
}
619380
func (s *WebhookDefinition) SetTargetAction(v string) *WebhookDefinition {
	s.TargetAction = &v
	return s
}
248576
func (s *PutDestinationInput) SetTargetArn(v string) *PutDestinationInput {
	s.TargetArn = &v
	return s
}