// deleteOne is a method delete a delivery from AWS SQS
354416
func (b *Broker) deleteOne(delivery *awssqs.ReceiveMessageOutput) error {
	qURL := b.defaultQueueURL()
	_, err := b.service.DeleteMessage(&awssqs.DeleteMessageInput{
		QueueUrl:      qURL,
		ReceiptHandle: delivery.Messages[0].ReceiptHandle,
	})

	if err != nil {
		return err
	}
	return nil
}
581982
func (r *Redis) Delete(key string) error {
	return r.Client.Del(key).Err()
}
652805
func (tx *Tx) ExecOne(query interface{}, params ...interface{}) (Result, error) {
	return tx.execOne(context.TODO(), query, params...)
}
1014333
func (tx *bytesTxn) Delete(key string) keyval.BytesTxn {
	tx.ops = append(tx.ops, clientv3.OpDelete(key))
	return tx
}
1093438
func (_m *Balancer) DeleteService(_a0 string) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
996406
func (mongo *MongoDB) DeleteOne(id string) error {
	_, err := mongo.Collection.RemoveAll(bson.M{"id": id})
	return err
}
614716
func (g *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newRoutesMetricContext("delete")
	return mc.Observe(g.c.Routes().Delete(ctx, meta.GlobalKey(route.Name)))
}
1222786
func (c *Client) DeleteRecord(record Record) error {
	resource := fmt.Sprintf("%s/%d/%s/%d", "/dns/managed", record.SourceID, "records", record.ID)

	resp, err := c.sendRequest(http.MethodDelete, resource, nil)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	return nil
}
1312357
func (v *vserver) deleteService(s *service) {
	if s.active {
		s.healthy = false
		v.updateState(s.ip)
	}
	log.Infof("%v: deleting service: %v", v, s)
	delete(v.services, s.serviceKey)
	// TODO(baptr): Once service contains seesaw.VIP, move check and
	// unconfigureVIP here.
}
282214
func DeleteService(key ServiceKey) error {
	mutex.Lock()
	defer mutex.Unlock()

	err := deleteServiceLocked(key)
	if err != nil {
		return err
	}

	return nil
}
82182
func (e *EmailsService) Delete(params interface{}) (result *Result) {
	result = e.client.delete(e.URL, params, nil)
	return
}
1051395
func (c *Client) DeleteZone(p *DeleteZoneParameter) (*Result, error) {
	obj, err := c.Request("deleteZone", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
442145
func (b *Broker) consumeOne(delivery *awssqs.ReceiveMessageOutput, taskProcessor iface.TaskProcessor) error {
	if len(delivery.Messages) == 0 {
		log.ERROR.Printf("received an empty message, the delivery was %v", delivery)
		return errors.New("received empty message, the delivery is " + delivery.GoString())
	}

	sig := new(tasks.Signature)
	decoder := json.NewDecoder(strings.NewReader(*delivery.Messages[0].Body))
	decoder.UseNumber()
	if err := decoder.Decode(sig); err != nil {
		log.ERROR.Printf("unmarshal error. the delivery is %v", delivery)
		return err
	}

	// If the task is not registered return an error
	// and leave the message in the queue
	if !b.IsTaskRegistered(sig.Name) {
		return fmt.Errorf("task %s is not registered", sig.Name)
	}

	err := taskProcessor.Process(sig)
	if err != nil {
		return err
	}
	// Delete message after successfully consuming and processing the message
	if err = b.deleteOne(delivery); err != nil {
		log.ERROR.Printf("error when deleting the delivery. delivery is %v, Error=%s", delivery, err)
	}
	return err
}
208295
func deleteService(client corev1.ServicesGetter, namespace string) error {
	err := client.Services(namespace).Delete(serviceName, &metav1.DeleteOptions{})
	return ingoreNotFound(err)
}
457947
func (tx *Tx) QueryOne(model interface{}, query interface{}, params ...interface{}) (Result, error) {
	return tx.queryOne(context.TODO(), model, query, params...)
}
287194
func (c *Cache) Delete(key string) {
	c.Client.Delete(cacheKey(key))
}
663914
func (r *remoteServiceObserver) OnDelete(key store.NamedKey) {
	if svc, ok := key.(*service.ClusterService); ok {
		scopedLog := log.WithFields(logrus.Fields{logfields.ServiceName: svc.String()})
		scopedLog.Debugf("Update event of remote service %#v", svc)

		mesh := r.remoteCluster.mesh
		mesh.globalServices.onDelete(svc)

		if merger := mesh.conf.ServiceMerger; merger != nil {
			merger.MergeExternalServiceDelete(svc)
		} else {
			scopedLog.Debugf("Ignoring remote service update. Missing merger function")
		}
	} else {
		log.Warningf("Received unexpected remote service delete object %+v", key)
	}
}