code: func (rsrbds *repositoryScopedRedisBlobDescriptorService) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) {
  	if err := dgst.Validate(); err != nil {
  		return distribution.Descriptor{}, err
  	}
  
  	conn := rsrbds.upstream.pool.Get()
  	defer conn.Close()
  
  	// Check membership to repository first
  	member, err := redis.Bool(conn.Do("SISMEMBER", rsrbds.repositoryBlobSetKey(rsrbds.repo), dgst))
  	if err != nil {
  		return distribution.Descriptor{}, err
  	}
  
  	if !member {
  		return distribution.Descriptor{}, distribution.ErrBlobUnknown
  	}
  
  	upstream, err := rsrbds.upstream.stat(ctx, conn, dgst)
  	if err != nil {
  		return distribution.Descriptor{}, err
  	}
  
  	// We allow a per repository mediatype, let's look it up here.
  	mediatype, err := redis.String(conn.Do("HGET", rsrbds.blobDescriptorHashKey(dgst), "mediatype"))
  	if err != nil {
  		return distribution.Descriptor{}, err
  	}
  
  	if mediatype != "" {
  		upstream.MediaType = mediatype
  	}
  
  	return upstream, nil
  }
docs: // Stat ensures that the digest is a member of the specified repository and
  // forwards the descriptor request to the global blob store. If the media type
  // differs for the repository, we override it.