feat(binding/go): add deleter - #7999
Open
ryankert01 wants to merge 1 commit into
Open
Conversation
ryankert01
requested review from
Xuanwo,
tisonkun and
xyjixyjixyji
as code owners
July 31, 2026 11:03
Member
Author
|
cc @dentiny |
Add a Deleter to the Go binding so callers can remove many paths through the batch deletion support of the service, mirroring `Operator::deleter` in the core. C binding: - `opendal_operator_deleter` returns an `opendal_deleter` wrapping `blocking::Deleter`. - `opendal_deleter_delete`, `opendal_deleter_delete_with`, `opendal_deleter_close` and `opendal_deleter_free` drive and release it. - `opendal_delete_options` gains a `From` impl for `options::DeleteOptions`, which `opendal_operator_delete_with` now uses as well. Go binding: - `Operator.Deleter` returns a `Deleter` with `Delete(path, opts...)` and `Close`. `Delete` queues a path; `Close` flushes the queue, waits for the deletions and reports their outcome. - `Operator.Remove(paths)` drives a deleter for the caller.
ryankert01
force-pushed
the
feat/go-deleter
branch
from
August 2, 2026 11:38
0d87866 to
2102faf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
Core exposes
Operator::deleter(), which queues paths and uses the service's batch deletion. Neither binding exposed it, so Go users deleted one path per request.What changes are included in this PR?
opendal_operator_deleterreturns anopendal_deleterhandle, driven byopendal_deleter_delete,_delete_with,_closeand_free.opendal_delete_optionsgains aFromimpl foroptions::DeleteOptions, now shared withopendal_operator_delete_with.Operator.Deleterreturns aDeleterwithDelete(path, opts...)andClose.Deletequeues a path;Closeflushes the queue and reports the outcome.Operator.Remove(paths)wraps it.Are there any user-facing changes?
New
Operator.DeleterandOperator.Removein the Go binding, plus theopendal_operator_deleterandopendal_deleter_*C functions. No breaking changes; docs updated.AI Usage Statement
Claude Code with Opus 5. (I understand the code that I told claude to write)