// Delete removes a container from the store by id.
424082
func (c *memoryStore) Delete(id string) {
	c.Lock()
	delete(c.s, id)
	c.Unlock()
}
889678
func (s *OrganizationsStore) Delete(ctx context.Context, o *chronograf.Organization) error {
	err := validOrganization(ctx)
	if err != nil {
		return err
	}

	o, err = s.store.Get(ctx, chronograf.OrganizationQuery{ID: &o.ID})
	if err != nil {
		return err
	}

	return s.store.Delete(ctx, o)
}
353794
func (s *MysqlStore) Delete(key interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	delete(s.data, key)
	return nil
}
568645
func (s *service) Delete(ctx context.Context, r *taskAPI.DeleteRequest) (*taskAPI.DeleteResponse, error) {
	log.G(ctx).Debugf("Delete: %s: %s", r.ID, r.ExecID)

	var p *process
	var err error
	if p, err = s.getProcess(r.ID, r.ExecID); err != nil {
		return nil, err
	}

	// This is a container
	if p.cid == p.id {
		rhs := s.newRunhcs()
		dopts := &runhcs.DeleteOpts{
			Force: true,
		}
		if err := rhs.Delete(ctx, p.id, dopts); err != nil {
			return nil, errors.Wrapf(err, "failed to delete container: %s", p.id)
		}
	}

	select {
	case <-time.After(5 * time.Second):
		// Force close the container process since it didn't shutdown in time.
		p.close()
	case <-p.waitBlock:
	}

	exit := p.stat()

	s.mu.Lock()
	delete(s.processes, p.id)
	s.mu.Unlock()

	s.publisher.Publish(ctx, runtime.TaskDeleteEventTopic, &eventstypes.TaskDelete{
		ContainerID: p.id,
		Pid:         exit.pid,
		ExitStatus:  exit.exitStatus,
		ExitedAt:    exit.exitedAt,
	})

	return &taskAPI.DeleteResponse{
		ExitedAt:   exit.exitedAt,
		ExitStatus: exit.exitStatus,
		Pid:        exit.pid,
	}, nil
}
587943
func (s *Service) Delete(ctx context.Context, options options.Delete) error {
	return s.collectContainersAndDo(ctx, func(c *container.Container) error {
		running := c.IsRunning(ctx)
		if !running || options.RemoveRunning {
			return c.Remove(ctx, options.RemoveVolume)
		}
		return nil
	})
}
1211091
func (s *Store) Delete(ident Ident) (err error) {
	if err = ident.Validate(); err != nil {
		return
	}
	if ident.Variant != "" {
		return s.deleteVariant(ident)
	}
	return s.deleteItem(ident)
}
29998
func (c *Client) Delete(ctx context.Context, container, key string) error {
	req := newReq(ctx, c.keyURL(container, key))
	req.Method = "DELETE"
	c.Auth.SignRequest(req)
	res, err := c.transport().RoundTrip(req)
	if err != nil {
		return err
	}
	if res != nil && res.Body != nil {
		defer res.Body.Close()
	}
	if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusNoContent ||
		res.StatusCode == http.StatusAccepted {
		return nil
	}
	return fmt.Errorf("azure HTTP error on DELETE: %d", res.StatusCode)
}
397498
func (multi *DashboardsStore) Delete(ctx context.Context, dashboard chronograf.Dashboard) error {
	var err error
	for _, store := range multi.Stores {
		err = store.Delete(ctx, dashboard)
		if err == nil {
			return nil
		}
	}
	return err
}
827938
func (*Config) Delete(c context.Context, req *config.DeleteRequest) (*empty.Empty, error) {
	if req.GetId() == "" {
		return nil, status.Errorf(codes.InvalidArgument, "ID is required")
	}
	if err := datastore.Delete(c, &model.Config{ID: req.Id}); err != nil {
		return nil, errors.Annotate(err, "failed to delete config").Err()
	}
	return &empty.Empty{}, nil
}
13154
func (d *Datastore) Delete(key ds.Key) (err error) {
	fn := d.KeyFilename(key)
	if !isFile(fn) {
		return ds.ErrNotFound
	}

	return os.Remove(fn)
}
1109918
func (g *Container) Delete(path ...string) error {
	var object interface{}

	if g.object == nil {
		return ErrNotObj
	}
	object = g.object
	for target := 0; target < len(path); target++ {
		if mmap, ok := object.(map[string]interface{}); ok {
			if target == len(path)-1 {
				if _, ok := mmap[path[target]]; ok {
					delete(mmap, path[target])
				} else {
					return ErrNotObj
				}
			}
			object = mmap[path[target]]
		} else {
			return ErrNotObj
		}
	}
	return nil
}
354165
func (s *DriversStore) Delete(driverName string) {
	s.Lock()
	defer s.Unlock()

	delete(s.store, driverName)
}
1283839
func (s *LDBStore) delete(batch *leveldb.Batch, idx *dpaDBIndex, idxKey []byte, po uint8) {
	metrics.GetOrRegisterCounter("ldbstore.delete", nil).Inc(1)

	gcIdxKey := getGCIdxKey(idx)
	batch.Delete(gcIdxKey)
	dataKey := getDataKey(idx.Idx, po)
	batch.Delete(dataKey)
	batch.Delete(idxKey)
	s.entryCnt--
	dbEntryCount.Dec(1)
	cntKey := make([]byte, 2)
	cntKey[0] = keyDistanceCnt
	cntKey[1] = po
	batch.Put(keyEntryCnt, U64ToBytes(s.entryCnt))
	batch.Put(cntKey, U64ToBytes(s.bucketCnt[po]))
}
818737
func (this *RedisStore) Delete(id string) error {
	key := id
	if this.opts.KeyPrefix != "" {
		key = this.opts.KeyPrefix + ":" + id
	}
	_, err := this.conn.Do("DEL", key)
	if err != nil {
		return err
	}
	return nil
}
1365237
func (s *Store) Delete(ctx context.Context, name string) error {
	return s.delete(ctx, name, false)
}
1324522
func (s *fsCacheStore) delete(id string) error {
	src, ok := s.sources[id]
	if !ok {
		return nil
	}
	if len(src.refs) > 0 {
		return errors.Errorf("can't delete %s because it has active references", id)
	}
	delete(s.sources, id)
	if err := s.db.Update(func(tx *bolt.Tx) error {
		return tx.DeleteBucket([]byte(id))
	}); err != nil {
		return err
	}
	return s.fs.Remove(src.BackendID)
}
1003597
func (s *MemoryStore) Delete(key string) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	delete(s.data, key)
	return nil
}