Documentation ¶
Overview ¶
Package cache provides facilities to speed up access to the storage backend.
Index ¶
- type BlobDigest
- func (gbd *BlobDigest) Add(dgst digest.Digest, item *DigestValue) error
- func (gbd *BlobDigest) Get(dgst digest.Digest) (DigestItem, error)
- func (gbd *BlobDigest) Purge()
- func (gbd *BlobDigest) Remove(dgst digest.Digest) error
- func (gbd *BlobDigest) RemoveRepository(dgst digest.Digest, repository string) error
- type BlobStatter
- type DigestCache
- type DigestItem
- type DigestValue
- type RepoDigest
- func (rd *RepoDigest) AddDigest(dgst digest.Digest, repository string) error
- func (rd *RepoDigest) ContainsRepository(dgst digest.Digest, repository string) bool
- func (rd *RepoDigest) RemoveDigest(dgst digest.Digest, repository string) error
- func (rd *RepoDigest) Repositories(dgst digest.Digest) (repos []string, err error)
- type RepositoryDigest
- type RepositoryScopedBlobDescriptor
- func (rbd *RepositoryScopedBlobDescriptor) Clear(ctx context.Context, dgst digest.Digest) error
- func (rbd *RepositoryScopedBlobDescriptor) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error
- func (rbd *RepositoryScopedBlobDescriptor) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobDigest ¶
type BlobDigest struct {
// contains filtered or unexported fields
}
func (*BlobDigest) Add ¶
func (gbd *BlobDigest) Add(dgst digest.Digest, item *DigestValue) error
func (*BlobDigest) Get ¶
func (gbd *BlobDigest) Get(dgst digest.Digest) (DigestItem, error)
func (*BlobDigest) Purge ¶
func (gbd *BlobDigest) Purge()
func (*BlobDigest) RemoveRepository ¶
func (gbd *BlobDigest) RemoveRepository(dgst digest.Digest, repository string) error
type BlobStatter ¶
type BlobStatter struct { Svc distribution.BlobStatter Cache DigestCache }
func (*BlobStatter) Stat ¶
func (bs *BlobStatter) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
Stat provides metadata about a blob identified by the digest.
type DigestCache ¶
type DigestCache interface { Get(dgst digest.Digest) (DigestItem, error) Remove(dgst digest.Digest) error RemoveRepository(dgst digest.Digest, repository string) error Add(dgst digest.Digest, value *DigestValue) error Purge() }
func NewBlobDigest ¶
func NewBlobDigest(digestSize, repoSize int, itemTTL time.Duration) (DigestCache, error)
type DigestItem ¶
type DigestItem struct {
// contains filtered or unexported fields
}
type DigestValue ¶
type DigestValue struct {
// contains filtered or unexported fields
}
type RepoDigest ¶
type RepoDigest struct {
Cache DigestCache
}
func (*RepoDigest) AddDigest ¶
func (rd *RepoDigest) AddDigest(dgst digest.Digest, repository string) error
func (*RepoDigest) ContainsRepository ¶
func (rd *RepoDigest) ContainsRepository(dgst digest.Digest, repository string) bool
func (*RepoDigest) RemoveDigest ¶
func (rd *RepoDigest) RemoveDigest(dgst digest.Digest, repository string) error
func (*RepoDigest) Repositories ¶
func (rd *RepoDigest) Repositories(dgst digest.Digest) (repos []string, err error)
type RepositoryDigest ¶
type RepositoryScopedBlobDescriptor ¶
type RepositoryScopedBlobDescriptor struct { Repo string Cache DigestCache Svc distribution.BlobDescriptorService }
func (*RepositoryScopedBlobDescriptor) SetDescriptor ¶
func (rbd *RepositoryScopedBlobDescriptor) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error
SetDescriptor assigns the descriptor to the digest for repository
func (*RepositoryScopedBlobDescriptor) Stat ¶
func (rbd *RepositoryScopedBlobDescriptor) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
Stat provides metadata about a blob identified by the digest.
Click to show internal directories.
Click to hide internal directories.