// Get returns the limit for given identifier.
320884
func (store *Store) Get(ctx context.Context, key string, rate limiter.Rate) (limiter.Context, error) {
	key = fmt.Sprintf("%s:%s", store.Prefix, key)
	now := time.Now()

	lctx := limiter.Context{}
	onWatch := func(rtx *libredis.Tx) error {

		created, err := store.doSetValue(rtx, key, rate.Period)
		if err != nil {
			return err
		}

		if created {
			expiration := now.Add(rate.Period)
			lctx = common.GetContextFromState(now, rate, expiration, 1)
			return nil
		}

		count, ttl, err := store.doUpdateValue(rtx, key, rate.Period)
		if err != nil {
			return err
		}

		expiration := now.Add(rate.Period)
		if ttl > 0 {
			expiration = now.Add(ttl)
		}

		lctx = common.GetContextFromState(now, rate, expiration, count)
		return nil
	}

	err := store.client.Watch(onWatch, key)
	if err != nil {
		err = errors.Wrapf(err, "limiter: cannot get value for %s", key)
		return limiter.Context{}, err
	}

	return lctx, nil
}
1124615
func (v Uint8) Get(deflt uint8) uint8 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
274383
func (a Args) Get(n int) string {
	if len(a) > n {
		return a[n]
	}
	return ""
}
1034805
func (v Uint64) Get(deflt uint64) uint64 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1335714
func (v String) Get(deflt string) string {
	if !v.Defined {
		return deflt
	}
	return v.V
}
447119
func (v Float32) Get(deflt float32) float32 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1170921
func (self *Model) Get(id interface{}, into interface{}) error {
	if record, err := self.db.Retrieve(self.collection.Name, id); err == nil {
		return record.Populate(into, self.collection)
	} else {
		return err
	}
}
596980
func (u Uint32) Get() (uint32, error) {
	if !u.Present() {
		var zero uint32
		return zero, errors.New("value not present")
	}
	return *u.value, nil
}
919555
func (aa *AtomicArray) Get(idx int) interface{} {
	// do not lock if not needed
	if idx < 0 || idx >= aa.length {
		return nil
	}

	aa.mutex.RLock()
	res := aa.items[idx]
	aa.mutex.RUnlock()
	return res
}
1093449
func (bi *BigInts) Get(index int) (bigint *BigInt, _ error) {
	if index < 0 || index >= len(bi.bigints) {
		return nil, errors.New("index out of bounds")
	}
	return &BigInt{bi.bigints[index]}, nil
}
656438
func (i Int64) Get() (int64, error) {
	if !i.Present() {
		var zero int64
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
81656
func (i *IdLock) Get(id string) sync.Locker {
	i.locksMu.Lock()
	defer i.locksMu.Unlock()

	var l sync.Locker
	var ok bool

	l, ok = i.locks[id]
	if !ok {
		l = &sync.Mutex{}
		i.locks[id] = l
	}

	return l
}
737515
func (c *TagValueSeriesIDCache) Get(name, key, value []byte) *tsdb.SeriesIDSet {
	c.Lock()
	defer c.Unlock()
	return c.get(name, key, value)
}
119185
func (i Int32) Get() (int32, error) {
	if !i.Present() {
		var zero int32
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
1181442
func (m *Map) Get(k ident.ID) (MapValue, bool) {
	hash := m.hash(k)
	for entry, ok := m.lookup[hash]; ok; entry, ok = m.lookup[hash] {
		if m.equals(entry.key.key, k) {
			return entry.value, true
		}
		// Linear probe to "next" to this entry (really a rehash)
		hash++
	}
	var empty MapValue
	return empty, false
}
758069
func Get(id string, params *stripe.IssuingDisputeParams) (*stripe.IssuingDispute, error) {
	return getC().Get(id, params)
}
36865
func (um *UserMap) Get(id string) (User, error) {
	um.Lock()
	defer um.Unlock()

	user, ok := um.Map[id]
	if !ok {
		return User{}, fmt.Errorf("could not find user with id %s", id)
	}
	return user, nil
}