// PurgeGroupMeta deletes stored group meta data
198431
func (b *Backend) PurgeGroupMeta(groupUUID string) error {
	_, err := b.groupMetasCollection.DeleteOne(context.Background(), bson.M{"_id": groupUUID})
	return err
}
1105168
func (f *Attempt_Data_Finished_) PurgeTimestamps() {
	if f.Finished.GetData() == nil {
		return
	}
	f.Finished.Data.Expiration = nil
}
261153
func GroupDelete(ctx context.Context, groupName string) error {
	return groupServiceInstance.GroupDelete(ctx, groupName)
}
528299
func (c *InstancesClient) DeleteAllMetadata(ctx context.Context, input *DeleteAllMetadataInput) error {
	fullPath := path.Join("/", c.client.AccountName, "machines", input.ID, "metadata")
	reqInputs := client.RequestInput{
		Method: http.MethodDelete,
		Path:   fullPath,
	}
	respReader, err := c.client.ExecuteRequest(ctx, reqInputs)
	if err != nil {
		return pkgerrors.Wrap(err, "unable to delete all machine metadata")
	}
	if respReader != nil {
		defer respReader.Close()
	}

	return nil
}
964526
func (client *Client) DeleteScalingGroup(args *DeleteScalingGroupArgs) (resp *DeleteScalingGroupResponse, err error) {
	response := DeleteScalingGroupResponse{}
	err = client.InvokeByFlattenMethod("DeleteScalingGroup", args, &response)

	if err != nil {
		return nil, err
	}
	return &response, nil
}
385690
func RegisterGroup(groupMeta apimachinery.GroupMeta) error {
	groupName := groupMeta.GroupVersion.Group
	if _, found := groupMetaMap[groupName]; found {
		return fmt.Errorf("group %v is already registered", groupMetaMap)
	}
	groupMetaMap[groupName] = &groupMeta
	return nil
}
978121
func GroupRemoveMember(ctx context.Context, groupName, uid string) error {
	logger.Log.Debugf("Remove user from group %s, UID=%d", groupName, uid)
	return groupServiceInstance.GroupRemoveMember(ctx, groupName, uid)
}
1269637
func (da *DigestAuth) Purge(count int) {
	da.mutex.Lock()
	defer da.mutex.Unlock()
	entries := make([]digestCacheEntry, 0, len(da.clients))
	for nonce, client := range da.clients {
		entries = append(entries, digestCacheEntry{nonce, client.lastSeen})
	}
	cache := digestCache(entries)
	sort.Sort(cache)
	for _, client := range cache[:count] {
		delete(da.clients, client.nonce)
	}
}
1164498
func (agg *HealthD) purge() {
	var threshold = agg.intervalDuration * 5 // NOTE: this is arbitrary.
	for k, _ := range agg.hostAggregations {
		if time.Since(k.Time) > threshold {
			delete(agg.hostAggregations, k)
		}
	}

	n := len(agg.intervalAggregations)
	if n > agg.maxIntervals {
		agg.intervalAggregations = agg.intervalAggregations[(n - agg.maxIntervals):]
	}
}
1262571
func (t *MemoryPool) PurgeLeases() error {
	t.poolLock.Lock()
	defer t.poolLock.Unlock()

	t.pool = nil
	t.pool = make([]leasepool.Lease, 0)
	return nil
}
405736
func (c *VSphereCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error {
	glog.V(8).Infof("vSphere cloud provider DeleteGroup not implemented yet")
	return fmt.Errorf("vSphere cloud provider does not support deleting cloud groups at this time.")
}
574568
func (s *fs) DeleteMetadata(dgst digest.Digest, key string) error {
	s.Lock()
	defer s.Unlock()

	return os.RemoveAll(filepath.Join(s.metadataDir(dgst), key))
}
640486
func (c *FindCache) Purge(orgId uint32) {
	c.RLock()
	cache, ok := c.cache[orgId]
	c.RUnlock()
	if !ok {
		return
	}
	cache.Purge()
}
491924
func DeleteGroup(svc Service, group *cloudinstances.CloudInstanceGroup) error {
	glog.V(2).Infof("Deleting Elastigroup %q", group.HumanName)

	return svc.Delete(
		context.Background(),
		group.Raw.(Elastigroup).Id())
}
961582
func (s *SQS) Purge() error {

	params := &sqs.PurgeQueueInput{
		QueueUrl: s.queueURL,
	}
	_, err := s.client().PurgeQueue(params)
	return err
}
1106803
func (r *marathonClient) DeleteGroup(name string, force bool) (*DeploymentID, error) {
	version := new(DeploymentID)
	path := fmt.Sprintf("%s/%s", marathonAPIGroups, trimRootPath(name))
	if force {
		path += "?force=true"
	}
	if err := r.apiDelete(path, nil, version); err != nil {
		return nil, err
	}

	return version, nil
}
150937
func (b *Backend) lockGroupMeta(groupUUID string) error {
	query := bson.M{
		"_id":  groupUUID,
		"lock": false,
	}
	change := bson.M{
		"$set": bson.M{
			"lock": true,
		},
	}

	_, err := b.groupMetasCollection.UpdateOne(context.Background(), query, change, options.Update().SetUpsert(true))

	return err
}