distribution/registry/proxy
Aaron Lehmann 31047c8113 Simplify digest.FromBytes calling convention
The current implementation of digest.FromBytes returns an error. This
error can never be non-nil, but its presence in the function signature
means each call site needs error handling code for an error that is
always nil.

I verified that none of the hash.Hash implementations in the standard
library can return an error on Write. Nor can any of the hash.Hash
implementations vendored in distribution.

This commit changes digest.FromBytes not to return an error. If Write
returns an error, it will panic, but as discussed above, this should
never happen.

This commit also avoids using a bytes.Reader to feed data into the hash
function in FromBytes. This makes the hypothetical case that would panic
a bit more explicit, and should also be more performant.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-14 14:30:51 -08:00
..
scheduler Buffer writing the scheduler entry state to disk by periodically checking for 2015-10-29 11:35:52 -07:00
proxyauth.go Add pull through cache functionality to the Registry which can be configured 2015-08-04 16:09:55 -07:00
proxyblobstore.go Fix a race condition in pull through cache population by removing the functionality 2015-10-08 16:12:29 -07:00
proxyblobstore_test.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
proxymanifeststore.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
proxymanifeststore_test.go Simplify digest.FromBytes calling convention 2015-12-14 14:30:51 -08:00
proxymetrics.go Add pull through cache functionality to the Registry which can be configured 2015-08-04 16:09:55 -07:00
proxyregistry.go Fix a race condition in pull through cache population by removing the functionality 2015-10-08 16:12:29 -07:00