// Get returns a count for a given id.
196475
func (c *lruCache) Get(id uint64) uint64 {
	n, _ := c.cache.Get(id)
	nn, _ := n.(uint64)
	return nn
}
205908
func (instanceApi *InstanceApi) Get(id string) (*Instance, error) {
	data, err := instanceApi.entityService.Get(id, map[string]string{})
	if err != nil {
		return nil, err
	}
	return parseInstance(data), nil
}
990669
func (rm *RouteManager) Get(id string) (*Route, error) {
	rm.Lock()
	defer rm.Unlock()
	route, ok := rm.routes[id]
	if !ok {
		return nil, os.ErrNotExist
	}
	return route, nil
}
861537
func (r *RoutesService) Get(id string) (*Route, *http.Response, error) {
	return r.GetWithContext(context.TODO(), id)
}
703818
func (e *Store) Get(id string) *Config {
	e.RLock()
	res := e.byID[id]
	e.RUnlock()
	return res
}
218781
func (a *Allocator) Get(ctx context.Context, key AllocatorKey) (idpool.ID, error) {
	if id := a.mainCache.get(key.GetKey()); id != idpool.NoID {
		return id, nil
	}

	return a.GetNoCache(ctx, key)
}
1033635
func Get(id string, params *stripe.TerminalReaderGetParams) (*stripe.TerminalReader, error) {
	return getC().Get(id, params)
}
753846
func (store *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error) {
	if store.Kapacitor == nil || store.Kapacitor.ID != id {
		return chronograf.Server{}, fmt.Errorf("unable to find Kapacitor with id %d", id)
	}
	return *store.Kapacitor, nil
}
439503
func (srv *Config) Get(c context.Context, req *config.GetRequest) (*config.Config, error) {
	cfg, ok := srv.cfg.Load(req.GetId())
	if !ok {
		return nil, status.Errorf(codes.NotFound, "no config found with ID %q", req.GetId())
	}
	return cfg.(*config.Config), nil
}
795043
func (s *Store) Get(id packet.ID) *Future {
	s.RLock()
	defer s.RUnlock()

	return s.store[id]
}
977980
func (list *Validators) Get(id ID) (p Validator, err error) {
	list.RLock()
	defer list.RUnlock()
	var ok bool
	if p, ok = list.providers[id]; !ok {
		return nil, fmt.Errorf("provider %v doesn't exist", id)
	}
	return p, nil
}
9243
func (c *memoryStore) Get(id string) *Container {
	var res *Container
	c.RLock()
	res = c.s[id]
	c.RUnlock()
	return res
}
812568
func (api *NetworksAPI) Get(id string) (network *Network, err error) {
	res, err := api.client.restClient.Get(api.client.Endpoint+networkUrl+id, api.client.options.TokenOptions)
	if err != nil {
		return
	}
	defer res.Body.Close()
	res, err = getError(res)
	if err != nil {
		return
	}
	var result Network
	err = json.NewDecoder(res.Body).Decode(&result)
	return &result, err
}
502317
func Get(id string, params *stripe.TransferParams) (*stripe.Transfer, error) {
	return getC().Get(id, params)
}
1116871
func (d *DeploysService) Get(id string) (*Deploy, *Response, error) {
	deploy := &Deploy{Id: id, client: d.client}
	resp, err := deploy.Reload()

	return deploy, resp, err
}
243853
func Get(collectionName, id string) (*map[string]interface{}, error) {
	connection := shared.Connection()
	if connection == nil {
		return nil, errors.New("No connection to database server")
	}
	var result map[string]interface{}
	collection := connection.DB(variables.DBName).C(collectionName)
	err := collection.Find(bson.M{"_id": id}).One(&result)
	if err != nil {
		return nil, err
	}
	return &result, nil
}
943144
func (nu *Numbered) Get(id int64, purpose string) (val interface{}, err error) {
	nu.mu.Lock()
	defer nu.mu.Unlock()
	nw, ok := nu.resources[id]
	if !ok {
		if val, ok := nu.recentlyUnregistered.Get(fmt.Sprintf("%v", id)); ok {
			unreg := val.(*unregistered)
			return nil, fmt.Errorf("ended at %v (%v)", unreg.timeUnregistered.Format("2006-01-02 15:04:05.000 MST"), unreg.reason)
		}
		return nil, fmt.Errorf("not found")
	}
	if nw.inUse {
		return nil, fmt.Errorf("in use: %s", nw.purpose)
	}
	nw.inUse = true
	nw.purpose = purpose
	return nw.val, nil
}