Ejemplo n.º 1
0
// Delete removes the object from the store.
func (c *Client) Delete(obj db.Entity) error {
	return helpers.WrapDelete(c, obj, func(path string) error {
		if _, err := c.client.Delete(context.Background(), c.qualified(path), nil); err != nil {
			return errors.EtcdToErrored(err)
		}

		return nil
	})
}
Ejemplo n.º 2
0
// Delete removes a key from consul.
func (c *Client) Delete(obj db.Entity) error {
	return helpers.WrapDelete(c, obj, func(path string) error {
		_, err := c.client.KV().Delete(c.qualified(path), nil)
		return err
	})
}