cache

package
v3.9.0-alpha.4+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cache provides facilities to speed up access to the storage backend.

Index

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) Remove

func (gbd *BlobDigest) Remove(dgst digest.Digest) error

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

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 RepositoryDigest interface {
	AddDigest(dgst digest.Digest, repository string) error
	RemoveDigest(dgst digest.Digest, repository string) error
	ContainsRepository(dgst digest.Digest, repository string) bool
	Repositories(dgst digest.Digest) ([]string, error)
}

type RepositoryScopedBlobDescriptor

type RepositoryScopedBlobDescriptor struct {
	Repo  string
	Cache DigestCache
	Svc   distribution.BlobDescriptorService
}

func (*RepositoryScopedBlobDescriptor) Clear

Clear removes digest from the repository cache

func (*RepositoryScopedBlobDescriptor) SetDescriptor

SetDescriptor assigns the descriptor to the digest for repository

func (*RepositoryScopedBlobDescriptor) Stat

Stat provides metadata about a blob identified by the digest.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL