// GetPrereqs returns the engine prereqs (none).
505401
func (e *ListTrackers2Engine) Prereqs() Prereqs {
	session := false
	if len(e.arg.Assertion) == 0 {
		session = true
	}
	return Prereqs{Device: session}
}
1233892
func (ctx *Context) GETKeys() []string {
	var res []string
	ctx.Request.URI().QueryArgs().VisitAll(func(key, value []byte) {
		res = append(res, string(key))
	})
	return res
}
305023
func (ctx *Context) GetQuery(key string) (string, bool) {
	req := ctx.Request
	if values, ok := req.URL.Query()[key]; ok && len(values) > 0 {
		return values[0], true
	}
	return "", false
}
1215828
func (l *Client) GetProviders() ([]Provider, error) {
	res := ApiResp{}
	data := []Provider{}

	// make the request
	err := l.Get(providerListEndpoint, nil, nil, &res, &data)
	if err != nil {
		return data, err
	}

	return data, nil
}
358919
func (c *Client) GetServices(ctx context.Context) (map[string]string, error) {
	var services map[string]string

	req, err := c.NewRequest("GET", servicesPath, nil, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &services); err != nil {
		return nil, err
	}

	return services, err
}
83262
func (c *Client) GetQueries(ctx context.Context, options *QueryOptions) (*QuerySearch, error) {
	var querySearch QuerySearch

	req, err := c.NewRequest("GET", queryPath, options, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &querySearch); err != nil {
		return nil, err
	}

	return &querySearch, nil
}
1124915
func (k cursorKind) fetchPrevCursor(c context.Context, pkg, cursor string) string {
	itm, err := memcache.GetKey(c, k.cursorKey(pkg, cursor))
	if err != nil {
		if err != memcache.ErrCacheMiss {
			logging.WithError(err).Errorf(c, "Failed to fetch prev cursor %q from memcache", k)
		}
		return ""
	}
	return string(itm.Value())
}
1311518
func (h *execWorker) getResults() execResult {
	h.mutex.Lock()
	defer h.mutex.Unlock()
	return h.result
}
1344953
func (api *API) Prechecks() error {
	model, err := api.precheckBackend.Model()
	if err != nil {
		return errors.Annotate(err, "retrieving model")
	}
	backend, err := api.precheckBackend.ControllerBackend()
	if err != nil {
		return errors.Trace(err)
	}
	controllerModel, err := backend.Model()
	if err != nil {
		return errors.Trace(err)
	}
	return migration.SourcePrecheck(
		api.precheckBackend,
		api.presence.ModelPresence(model.UUID()),
		api.presence.ModelPresence(controllerModel.UUID()),
	)
}
730409
func GetConsoles(c context.Context, consoles []ConsoleID) ([]*Console, error) {
	result := make([]*Console, len(consoles))
	for i, con := range consoles {
		result[i] = con.SetID(c, nil)
	}
	if err := datastore.Get(c, result); err != nil {
		err = ReplaceNSEWith(err.(errors.MultiError), ErrConsoleNotFound)
		return result, errors.Annotate(err, "getting %s consoles", consoles).Err()
	}
	return result, nil
}
912790
func (v *GenerateServiceRequest) GetServices() (o map[ServiceID]*Service) {
	if v != nil {
		o = v.Services
	}
	return
}
401906
func (d *dbBase) GetTables(db dbQuerier) (map[string]bool, error) {
	tables := make(map[string]bool)
	query := d.ins.ShowTablesQuery()
	rows, err := db.Query(query)
	if err != nil {
		return tables, err
	}

	defer rows.Close()

	for rows.Next() {
		var table string
		err := rows.Scan(&table)
		if err != nil {
			return tables, err
		}
		if table != "" {
			tables[table] = true
		}
	}

	return tables, nil
}
647596
func (api *APIv4) GetConstraints(args params.GetApplicationConstraints) (params.GetConstraintsResults, error) {
	if err := api.checkCanRead(); err != nil {
		return params.GetConstraintsResults{}, errors.Trace(err)
	}
	app, err := api.backend.Application(args.ApplicationName)
	if err != nil {
		return params.GetConstraintsResults{}, errors.Trace(err)
	}
	cons, err := app.Constraints()
	return params.GetConstraintsResults{cons}, errors.Trace(err)
}
648886
func (c *Client) GetPrefilter() (*models.Prefilter, error) {
	resp, err := c.Prefilter.GetPrefilter(nil)
	if err != nil {
		return nil, Hint(err)
	}
	return resp.Payload, nil
}
978196
func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1beta1.PriorityClass{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.PriorityClass), err
}
246489
func (p *Preemptor) getNumPreemptions(alloc *structs.Allocation) int {
	c, ok := p.currentPreemptions[structs.NewNamespacedID(alloc.JobID, alloc.Namespace)][alloc.TaskGroup]
	if !ok {
		return 0
	}
	return c
}
1030539
func (l *ServiceListener) getStateRequests(logger *log.Entry, stateIDs []string) ([]StateRequest, bool) {

	reqs := make([]StateRequest, len(stateIDs))
	ok := true

	for i, stateID := range stateIDs {
		hostID, serviceID, instanceID, err := ParseStateID(stateID)
		if err != nil {

			// This shouldn't happen
			logger.WithField("stateid", stateID).WithError(err).Warn("Unexpected error trying to parse state id")
			ok = false
			continue
		}

		reqs[i] = StateRequest{
			PoolID:     l.poolid,
			HostID:     hostID,
			ServiceID:  serviceID,
			InstanceID: instanceID,
		}
	}

	return reqs, ok
}