// AddDigest adds a digest reference to the store.
345198
func (store *store) AddDigest(ref reference.Canonical, id digest.Digest, force bool) error {
	return store.addReference(ref, id, force)
}
17354
func NewDigest(chall string) (*Digest, error) {
	c, err := parseChallenge(chall)
	if err != nil {
		return nil, err
	}
	return &Digest{
		Realm:      c.Realm,
		Nonce:      c.Nonce,
		Algorithm:  c.Algorithm,
		Opaque:     c.Opaque,
		Qop:        c.Qop,
		NonceCount: 1,
		m:          &sync.Mutex{},
	}, nil
}
26094
func NewDigestFromHex(alg, hex string) Digest {
	return Digest(fmt.Sprintf("%s:%s", alg, hex))
}
567179
func (c *Carbon) AddCenturies(cent int) *Carbon {
	return NewCarbon(c.AddDate(yearsPerCenturies*cent, 0, 0))
}
14787
func (t *partitionedTable) AddRecord(ctx sessionctx.Context, r []types.Datum, opts ...*table.AddRecordOpt) (recordID int64, err error) {
	partitionInfo := t.meta.GetPartitionInfo()
	pid, err := t.locatePartition(ctx, partitionInfo, r)
	if err != nil {
		return 0, errors.Trace(err)
	}

	tbl := t.GetPartition(pid)
	return tbl.AddRecord(ctx, r, opts...)
}
1374201
func (mp *MultiProvider) Add(dgst digest.Digest, p content.Provider) {
	mp.mu.Lock()
	defer mp.mu.Unlock()
	mp.sub[dgst] = p
}
450929
func (al *assetLru) Add(key int64, value *assetCache) {
	// Already in cache?
	if ee, ok := al.cache[key]; ok {
		al.ll.MoveToFront(ee)
		ee.Value.value = value
		return
	}

	// Add to cache if not present
	ele := al.ll.PushFront(&assetLruListEntry{key, value})
	al.cache[key] = ele

	if al.ll.Len() > al.maxEntries {
		al.removeOldest()
	}
}
750699
func (d *Digester) Add(s string) {
	if len(d.bs) > 0 {
		// separate labels with a null byte
		d.bs = append(d.bs, '\x00')
	}
	d.bs = append(d.bs, s...)
}
1138408
func NewDigestFromBytes(alg Algorithm, p []byte) Digest {
	return Digest(fmt.Sprintf("%s:%x", alg, p))
}
743513
func NewKeyWithDigest(namespace string, setName string, key interface{}, digest []byte) (*Key, error) {
	newKey := &Key{
		namespace: namespace,
		setName:   setName,
		userKey:   NewValue(key),
	}

	if err := newKey.SetDigest(digest); err != nil {
		return nil, err
	}
	return newKey, nil
}
434013
func (self *StateDB) AddBalance(addr common.Address, amount *big.Int) {
	stateObject := self.GetOrNewStateObject(addr)
	if stateObject != nil {
		stateObject.AddBalance(amount)
	}
}
1085627
func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput {
	s.LayerDigests = v
	return s
}
249830
func (c *Client) AddMultisigAddress(requiredSigs int, addresses []btcutil.Address, account string) (btcutil.Address, error) {
	return c.AddMultisigAddressAsync(requiredSigs, addresses,
		account).Receive()
}
39057
func (store *store) AddTag(ref reference.Named, id digest.Digest, force bool) error {
	if _, isCanonical := ref.(reference.Canonical); isCanonical {
		return errors.WithStack(invalidTagError("refusing to create a tag with a digest reference"))
	}
	return store.addReference(reference.TagNameOnly(ref), id, force)
}
386485
func (a *AggMetric) Add(ts uint32, val float64) {
	a.Lock()
	defer a.Unlock()

	if a.rob == nil {
		// write directly
		a.add(ts, val)
	} else {
		// write through reorder buffer
		res, err := a.rob.Add(ts, val)

		if err == nil {
			if len(res) == 0 {
				a.lastWrite = uint32(time.Now().Unix())
			} else {
				for _, p := range res {
					a.add(p.Ts, p.Val)
				}
			}
		} else {
			log.Debugf("AM: failed to add metric to reorder buffer for %s. %s", a.key, err)
			a.discardedMetricsInc(err)
		}
	}
}
1053209
func WithDigest(name Named, digest digest.Digest) (Canonical, error) {
	if !anchoredDigestRegexp.MatchString(digest.String()) {
		return nil, ErrDigestInvalidFormat
	}
	if tagged, ok := name.(Tagged); ok {
		return reference{
			name:   name.Name(),
			tag:    tagged.Tag(),
			digest: digest,
		}, nil
	}
	return canonicalReference{
		name:   name.Name(),
		digest: digest,
	}, nil
}
601319
func (i *Index) Add(r *sam.Record, c bgzf.Chunk) error {
	return i.idx.Add(r, uint32(r.Bin()), c, isPlaced(r), isMapped(r))
}