Documentation ¶
Overview ¶
Package cache provides facilities to speed up access to the storage backend.
Index ¶
- type BlobStatter
- type DigestCache
- type DigestItem
- type DigestValue
- type Provider
- func (c *Provider) Clear(ctx context.Context, dgst digest.Digest) error
- func (c *Provider) RepositoryScoped(repo string) (distribution.BlobDescriptorService, error)
- func (c *Provider) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error
- func (c *Provider) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, 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 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) (distribution.Descriptor, error) ScopedGet(dgst digest.Digest, repository string) (distribution.Descriptor, error) Repositories(dgst digest.Digest) []string Remove(dgst digest.Digest) error ScopedRemove(dgst digest.Digest, repository string) error Add(dgst digest.Digest, value *DigestValue) error }
func NewBlobDigest ¶
func NewBlobDigest(digestSize, repoSize int, itemTTL time.Duration, metrics metrics.DigestCache) (DigestCache, error)
type DigestItem ¶
type DigestItem struct {
// contains filtered or unexported fields
}
type DigestValue ¶
type DigestValue struct {
// contains filtered or unexported fields
}
type Provider ¶
type Provider struct {
Cache DigestCache
}
func (*Provider) RepositoryScoped ¶
func (c *Provider) RepositoryScoped(repo string) (distribution.BlobDescriptorService, error)
func (*Provider) SetDescriptor ¶
func (c *Provider) SetDescriptor(ctx context.Context, dgst digest.Digest, desc distribution.Descriptor) error
func (*Provider) Stat ¶
func (c *Provider) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
type RepositoryDigest ¶
type RepositoryDigest interface { AddDigest(dgst digest.Digest, repository string) error ContainsRepository(dgst digest.Digest, repository string) bool Repositories(dgst digest.Digest) []string }
func NewRepositoryDigest ¶
func NewRepositoryDigest(cache DigestCache) RepositoryDigest
type RepositoryScopedBlobDescriptor ¶
type RepositoryScopedBlobDescriptor struct { Repo string Cache DigestCache Svc distribution.BlobDescriptorService }
func (*RepositoryScopedBlobDescriptor) Clear ¶
func (rbd *RepositoryScopedBlobDescriptor) Clear(ctx context.Context, dgst digest.Digest) error
Clear removes digest from the repository cache
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.