(ctx context.Context, shard string, id strfmt.UUID, deletionTime time.Time, l types.ConsistencyLevel, schemaVersion uint64, )
| 166 | } |
| 167 | |
| 168 | func (r *Replicator) DeleteObject(ctx context.Context, |
| 169 | shard string, |
| 170 | id strfmt.UUID, |
| 171 | deletionTime time.Time, |
| 172 | l types.ConsistencyLevel, |
| 173 | schemaVersion uint64, |
| 174 | ) error { |
| 175 | coord := NewWriteCoordinator[SimpleResponse, error](r.client, r.router, r.metrics, r.class, shard, r.requestID(opDeleteObject), r.log) |
| 176 | release := r.inflight.register(shard) |
| 177 | defer release() |
| 178 | op := func(ctx context.Context, host, requestID string) error { |
| 179 | resp, err := r.client.DeleteObject(ctx, host, r.class, shard, requestID, id, deletionTime, schemaVersion) |
| 180 | if err == nil { |
| 181 | err = resp.FirstError() |
| 182 | } |
| 183 | if err != nil { |
| 184 | return fmt.Errorf("%q: %w", host, err) |
| 185 | } |
| 186 | return nil |
| 187 | } |
| 188 | rs, err := coord.Push(ctx, l, op, r.simpleCommit(shard), r.readSimpleResponse, r.flattenErrors, 1) |
| 189 | if err != nil { |
| 190 | r.log.WithField("op", "push.delete").WithField("class", r.class). |
| 191 | WithField("shard", shard).Error(err) |
| 192 | return fmt.Errorf("%s %q: %w", replicaerrors.MsgCLevel, l, replicaerrors.NewNotEnoughReplicasError(err)) |
| 193 | } |
| 194 | if err := firstError(rs); err != nil { |
| 195 | r.log.WithField("op", "put").WithField("class", r.class). |
| 196 | WithField("shard", shard).WithField("uuid", id).Error(err) |
| 197 | return err |
| 198 | } |
| 199 | return nil |
| 200 | } |
| 201 | |
| 202 | func (r *Replicator) PutObjects(ctx context.Context, |
| 203 | shard string, |
nothing calls this directly
no test coverage detected