-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coreapi: dag: Batching interface #5340
Conversation
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
DagOps | ||
|
||
// Commit commits nodes to the datastore and announces them to the network | ||
Commit(ctx context.Context) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: need this context for go-ipfs-api implementation (batch will hold a connection and stream files to dag/put
)
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
70be734
to
d6ee955
Compare
// DagAPI specifies the interface to IPLD | ||
type DagAPI interface { | ||
// DagOps groups operations that can be batched together | ||
type DagOps interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will probably also have Delete
on this interface, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there isn't dag rm
so I didn't add it here. But yes, that would be the place for that (will be in Block API, but that's for a separate PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct to me, Only thing is whether or not we want to add batch deletes right now, or do it later. If you want to do it later, then this LGTM and we can ship it
I think this is the nicest way to get batching in coreapi, but if you have some better ideas, I'm happy to hear them
Part of #5215 / #4498