-
Notifications
You must be signed in to change notification settings - Fork 2
Support non-block requests #45
Comments
IMO we should try and keep Caboose as limited to Saturn concerns as we can afford to. This means trying to keep it out of the IPLD game as much as we can. My understanding of what we need out of this interface boundary is:
So we can probably go with your initial proposal My thinking is that instead of the caller trying to communicate with Caboose about whether to do a retry via error sentinels they can just call Thoughts? |
@aschmahmann both can make sense - the semantics of Fetch(urlPath string, cb func(io.ReadCloser) error) error make more sense in my head. We expect there to be some level of failure cases where I can prototype |
Yeah, I'd hope the implementation internally isn't so dependent on this that we can change it later if need be. While you're prototyping try and keep in mind what you want the caller contract to be when the errors are streaming (i.e. interrupted CARs) rather than 4xx/5xx errors. |
#51 exposes the basic interface. I went with the interface type ErrPartialResponse struct {
error
StillNeed []string
} As the way to handle partial responses - the One thing this likely means is that i'm expect to update as i get through tests and support for efficient handling of those partial continuations is that the callback will evolve to This should be enough for initial integration in starting to craft what the car validation / fullifilling callback looks like. |
the first top-level interface of caboose is as a blockstore.
we should work with @aschmahmann to understand what requests for car files rather than blocks might look like as they pass through this library.
My first inclination is something like
where
cb
would validate if a response matched expected response (and would be called 0+ times, and at most 1 time where it returned anil
error)The text was updated successfully, but these errors were encountered: