// DELETE /shared_storages/{id}/servers/{id}
492076
func (api *API) DeleteSharedStorageServer(st_id string, ser_id string) (*SharedStorage, error) {
	result := new(SharedStorage)
	url := createUrl(api, sharedStoragePathSegment, st_id, "servers", ser_id)
	err := api.Client.Delete(url, nil, &result, http.StatusAccepted)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
138517
func (api *API) AddSharedStorageServers(st_id string, servers []SharedStorageServer) (*SharedStorage, error) {
	result := new(SharedStorage)
	req := struct {
		Servers []SharedStorageServer `json:"servers"`
	}{servers}
	url := createUrl(api, sharedStoragePathSegment, st_id, "servers")
	err := api.Client.Post(url, &req, &result, http.StatusAccepted)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
1082311
func (store *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error {
	if store.Kapacitor == nil || store.Kapacitor.ID != kap.ID {
		return fmt.Errorf("unable to find Kapacitor with id %d", kap.ID)
	}
	store.Kapacitor = nil
	return nil
}
1021377
func (s *LoadBalancerSetting) DeleteServer(ip string, port string) {
	res := []*LoadBalancerServer{}
	for _, server := range s.Servers {
		if server.IPAddress != ip || server.Port != port {
			res = append(res, server)
		}
	}

	s.Servers = res

}
330272
func (s *Store) remove(id string) error {
	if s.raft.State() != raft.Leader {
		return ErrNotLeader
	}

	f := s.raft.RemoveServer(raft.ServerID(id), 0, 0)
	if f.Error() != nil {
		if f.Error() == raft.ErrNotLeader {
			return ErrNotLeader
		}
		return f.Error()
	}

	c, err := newCommand(metadataDelete, id)
	if err != nil {
		return err
	}
	b, err := json.Marshal(c)
	if err != nil {
		return err
	}
	f = s.raft.Apply(b, s.ApplyTimeout)
	if e := f.(raft.Future); e.Error() != nil {
		if e.Error() == raft.ErrNotLeader {
			return ErrNotLeader
		}
		e.Error()
	}

	return nil
}
1232227
func (s *CacheOnStorage) DeleteMulti(keys ...interface{}) error {
	if err := s.storage.DeleteMulti(keys...); err != nil {
		return err
	}

	return s.cache.DeleteMulti(keys...)
}
918192
func (s *Server) RemoveAllServices() error {
	s.Lock()
	defer s.Unlock()
	s.svcs = defaultServices(s.name)
	s.db = att.NewDB(s.svcs, uint16(1)) // ble attrs start at 1
	return nil
}
1079596
func (h Osxkeychain) Delete(serverURL string) error {
	s, err := splitServer(serverURL)
	if err != nil {
		return err
	}
	defer freeServer(s)

	errMsg := C.keychain_delete(s)
	if errMsg != nil {
		defer C.free(unsafe.Pointer(errMsg))
		return errors.New(C.GoString(errMsg))
	}

	return nil
}
395948
func (ts *Server) DeleteShard(ctx context.Context, keyspace, shard string) error {
	shardPath := path.Join(KeyspacesPath, keyspace, ShardsPath, shard, ShardFile)
	if err := ts.globalCell.Delete(ctx, shardPath, nil); err != nil {
		return err
	}
	event.Dispatch(&events.ShardChange{
		KeyspaceName: keyspace,
		ShardName:    shard,
		Shard:        nil,
		Status:       "deleted",
	})
	return nil
}
647722
func (b *server) DeleteArchiveTasks(c context.Context, req *logdog.DeleteRequest) (*empty.Empty, error) {
	deleteTask.Add(c, int64(len(req.Tasks)))
	tasks := make([]*taskqueue.Task, 0, len(req.Tasks))
	for _, at := range req.Tasks {
		tasks = append(tasks, tqTaskLite(at))
	}
	logging.Infof(c, "Deleting %d tasks", len(req.Tasks))
	err := taskqueue.Delete(c, ArchiveQueueName, tasks...)
	if err != nil {
		logging.WithError(err).Errorf(c, "while deleting tasks\n%#v", tasks)
	}
	return &empty.Empty{}, nil
}
978896
func (c *T) RemoveServer(beSrvURLKey backend.SrvURLKey) {
	c.mu.Lock()
	defer c.mu.Unlock()

	delete(c.beSrvRTMs, beSrvURLKey)
}
85062
func (h Secretservice) Delete(serverURL string) error {
	if serverURL == "" {
		return errors.New("missing server url")
	}
	server := C.CString(serverURL)
	defer C.free(unsafe.Pointer(server))

	if err := C.delete(server); err != nil {
		defer C.g_error_free(err)
		errMsg := (*C.char)(unsafe.Pointer(err.message))
		return errors.New(C.GoString(errMsg))
	}
	return nil
}
1212495
func (s *RateLimitedStorage) DeleteMulti(keys ...interface{}) error {
	s.wait()
	defer s.signal()

	return s.storage.DeleteMulti(keys)
}
1094049
func (api *GSLBAPI) DeleteGSLBServer(gslbName string, ip string) error {
	gslbItem, err := api.findOrCreateBy(gslbName)
	if err != nil {
		return err
	}
	gslbItem.Settings.GSLB.DeleteServer(ip)

	if gslbItem.HasGSLBServer() {
		_, err = api.updateGSLBServers(gslbItem)
		if err != nil {
			return err
		}

	} else {
		_, err = api.Delete(gslbItem.ID)
		if err != nil {
			return err
		}

	}
	return nil
}
170958
func (s *fs) Delete(dgst digest.Digest) error {
	s.Lock()
	defer s.Unlock()

	if err := os.RemoveAll(s.metadataDir(dgst)); err != nil {
		return err
	}
	return os.Remove(s.contentFile(dgst))
}
1121638
func (c *Cache) Delete(host string) {
	c.Lock()
	defer c.Unlock()
	delete(c.Clients, host)
}
401053
func (api *API) ListSharedStorages(args ...interface{}) ([]SharedStorage, error) {
	url, err := processQueryParams(createUrl(api, sharedStoragePathSegment), args...)
	if err != nil {
		return nil, err
	}
	result := []SharedStorage{}
	err = api.Client.Get(url, &result, http.StatusOK)
	if err != nil {
		return nil, err
	}
	for index, _ := range result {
		result[index].api = api
	}
	return result, nil
}