Documentation ¶
Index ¶
- func Copy(cw Writer, r io.Reader, size int64, expected digest.Digest) error
- func NewReader(ra ReaderAt) io.Reader
- func ReadBlob(ctx context.Context, provider Provider, dgst digest.Digest) ([]byte, error)
- func WriteBlob(ctx context.Context, cs Ingester, ref string, r io.Reader, size int64, ...) error
- type Info
- type IngestManager
- type Ingester
- type Manager
- type Provider
- type ReaderAt
- type Status
- type Store
- type WalkFunc
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy copies data with the expected digest from the reader into the provided content store writer.
This is useful when the digest and size are known beforehand. When the size or digest is unknown, these values may be empty.
Copy is buffered, so no need to wrap reader in buffered io.
func ReadBlob ¶
ReadBlob retrieves the entire contents of the blob from the provider.
Avoid using this for large blobs, such as layers.
func WriteBlob ¶
func WriteBlob(ctx context.Context, cs Ingester, ref string, r io.Reader, size int64, expected digest.Digest) error
WriteBlob writes data with the expected digest into the content store. If expected already exists, the method returns immediately and the reader will not be consumed.
This is useful when the digest and size are known beforehand.
Copy is buffered, so no need to wrap reader in buffered io.
Types ¶
type Info ¶
type Info struct { Digest digest.Digest Size int64 CreatedAt time.Time UpdatedAt time.Time Labels map[string]string }
TODO(stevvooe): Consider a very different name for this struct. Info is way to general. It also reads very weird in certain context, like pluralization.
type IngestManager ¶
type IngestManager interface { // Status returns the status of the provided ref. Status(ctx context.Context, ref string) (Status, error) // ListStatuses returns the status of any active ingestions whose ref match the // provided regular expression. If empty, all active ingestions will be // returned. ListStatuses(ctx context.Context, filters ...string) ([]Status, error) // Abort completely cancels the ingest operation targeted by ref. Abort(ctx context.Context, ref string) error }
IngestManager provides methods for managing ingests.
type Manager ¶
type Manager interface { // Info will return metadata about content available in the content store. // // If the content is not present, ErrNotFound will be returned. Info(ctx context.Context, dgst digest.Digest) (Info, error) // Update updates mutable information related to content. // If one or more fieldpaths are provided, only those // fields will be updated. // Mutable fields: // labels.* Update(ctx context.Context, info Info, fieldpaths ...string) (Info, error) // Walk will call fn for each item in the content store which // match the provided filters. If no filters are given all // items will be walked. Walk(ctx context.Context, fn WalkFunc, filters ...string) error // Delete removes the content from the store. Delete(ctx context.Context, dgst digest.Digest) error }
Manager provides methods for inspecting, listing and removing content.