code: func (reg *registry) Repository(ctx context.Context, canonicalName reference.Named) (distribution.Repository, error) {
  	var descriptorCache distribution.BlobDescriptorService
  	if reg.blobDescriptorCacheProvider != nil {
  		var err error
  		descriptorCache, err = reg.blobDescriptorCacheProvider.RepositoryScoped(canonicalName.Name())
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return &repository{
  		ctx:             ctx,
  		registry:        reg,
  		name:            canonicalName,
  		descriptorCache: descriptorCache,
  	}, nil
  }
docs: // Repository returns an instance of the repository tied to the registry.
  // Instances should not be shared between goroutines but are cheap to
  // allocate. In general, they should be request scoped.