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
{{ message }}
Repository navigation
Proposal: Manifests.(GetByTag) : add digest argument for conditional get #692
There is a need in the repository client to do a conditional get for a manifest. Currently if a client has a manifest and a tag, there is no way to check the remote for a newer version without fetching and hashing it.
I propose adding a functional parameter to Manifests.(GetByTag) which will include the expected digest of the tagged manifest. The implementation of GetByTag will include the digest in the etag header which will be read by the server and acted on accordingly.
The semantics for this call will change in that if a digest is provided which matches the remote tagged manifest, the call will return a nil manifest (and a nil error)
@RichardScothern This functionality should be hidden behind the GetByTag interface (this will be TagService.Get at some point. Note that we may want to handle this with some options to Get.
d, err := Get(tag, Previous(previousDigest))
Although, we may just want to build this right into the client, rather than requiring clients to handle it at a higher level. This may not be possible with the layered approach, as that is likely the source of the proposal.
Activity
[-]Manifests.(GetByTag) : add digest argument for conditional get[/-][+]Proposal: Manifests.(GetByTag) : add digest argument for conditional get[/+]stevvooe commentedon Jul 13, 2015
@RichardScothern This functionality should be hidden behind the
GetByTaginterface (this will beTagService.Getat some point. Note that we may want to handle this with some options toGet.Although, we may just want to build this right into the client, rather than requiring clients to handle it at a higher level. This may not be possible with the layered approach, as that is likely the source of the proposal.