You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What if my pusher (returned by resolver.Pusher()) needs some finalizing done? There are Commit() and Close() calls on the content.Writer returned by eachPush(), but not overall. I might have a custom resolver (and therefore pusher) that needs to do some activity at the end of a whole PushContent.
remotes.PushContent() has an option for doing so via its handlers, which can be both pre- and post-, but oras.Push() only accepts pre-push handlers for each push, see here. In any case, those are called with each push, and so no way to know, "this is the final push".
I can do something at the Resolver level, rather than Pusher, and thus have control after calling oras.Push(), but that is one level too high for it, and could bleed into other things. For example, I should be able to push 3 images up, each time calling oras.Push() (and hence resolver.Pusher()) from the same instance of resolver; finalizing would really mess that up.
The text was updated successfully, but these errors were encountered:
Looking at how
oras.Push()
is called here, we pass it aremotes.Resolver
:Push()
, in turn, gets a pusher by callingresolver.Pusher()
hereand then passing that pusher to
remotes.PushContent
here:What if my pusher (returned by
resolver.Pusher()
) needs some finalizing done? There areCommit()
andClose()
calls on thecontent.Writer
returned by eachPush()
, but not overall. I might have a custom resolver (and therefore pusher) that needs to do some activity at the end of a wholePushContent
.remotes.PushContent()
has an option for doing so via its handlers, which can be both pre- and post-, butoras.Push()
only accepts pre-push handlers for each push, see here. In any case, those are called with each push, and so no way to know, "this is the final push".I can do something at the
Resolver
level, rather thanPusher
, and thus have control after callingoras.Push()
, but that is one level too high for it, and could bleed into other things. For example, I should be able to push 3 images up, each time callingoras.Push()
(and henceresolver.Pusher()
) from the same instance ofresolver
; finalizing would really mess that up.The text was updated successfully, but these errors were encountered: