zot
zot copied to clipboard
[Feat]: for better UX, stream blobs as you fetch when on-demand sync is enabled
Is your feature request related to a problem? Please describe.
Currently, we fetch blobs and store locally and then serve. It could cause some clients to error out. So basically, on-demand is mainly a trigger. A better UX for clients would be to stream to them as the blobs are fetched.
Describe the solution you'd like
For this feature, we may have to enhance or replace the containers/image library entirely and use our own custom library.
You may need a pattern like so (or a combo): https://pkg.go.dev/io#MultiWriter https://pkg.go.dev/io#TeeReader
Also, a SyncWatcher so that we pull only once and fan-out to pending clients
Describe alternatives you've considered
No response
Additional context
No response