Documentation ¶
Overview ¶
Package store is used to interface with different types of storage (memory, disk)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobCreator ¶
type BlobCreator interface { // WriteCloser is used to push the blob content. io.WriteCloser // Cancel is used to stop an upload. Cancel() // Size reports the number of bytes pushed. Size() int64 // Digest is used to get the current digest of the content. Digest() digest.Digest // Verify ensures a digest matches the content. Verify(digest.Digest) error }
BlobCreator is used to upload new blobs.
type BlobOpt ¶
type BlobOpt func(*blobConfig)
func BlobWithAlgorithm ¶
func BlobWithAlgorithm(a digest.Algorithm) BlobOpt
func BlobWithDigest ¶
func BlobWithDigest(d digest.Digest) BlobOpt
type Repo ¶
type Repo interface { // IndexGet returns the current top level index for a repo. IndexGet() (types.Index, error) // IndexInsert adds a new entry to the index and writes the change to index.json. IndexInsert(desc types.Descriptor, opts ...types.IndexOpt) error // IndexRemove deletes an entry from the index and writes the change to index.json. IndexRemove(desc types.Descriptor) error // BlobGet returns a reader to an entry from the CAS. BlobGet(d digest.Digest) (io.ReadSeekCloser, error) // BlobCreate is used to create a new blob. BlobCreate(opts ...BlobOpt) (BlobCreator, string, error) // BlobDelete removes an entry from the CAS. BlobDelete(d digest.Digest) error // BlobSession is used to retrieve an upload session BlobSession(sessionID string) (BlobCreator, error) // Done indicates the routine using this repo is finished. // This must be called exactly once for every instance of [Store.RepoGet]. Done() // contains filtered or unexported methods }
Repo interface is used to access a CAS and the index managing known manifests.
type Store ¶
type Store interface { // RepoGet returns a repo from the store. // When finished, the method [Repo.Done] must be called. RepoGet(repoStr string) (Repo, error) // Close releases resources used by the store. // The store should not be used after being closed. Close() error }
Store interface is used to abstract access to a backend storage system for repositories.
Click to show internal directories.
Click to hide internal directories.