Documentation ¶
Overview ¶
Package ocidir implements the OCI Image Layout scheme with a directory (not packed in a tar)
Index ¶
- type OCIDir
- func (o *OCIDir) BlobDelete(ctx context.Context, r ref.Ref, d descriptor.Descriptor) error
- func (o *OCIDir) BlobGet(ctx context.Context, r ref.Ref, d descriptor.Descriptor) (blob.Reader, error)
- func (o *OCIDir) BlobHead(ctx context.Context, r ref.Ref, d descriptor.Descriptor) (blob.Reader, error)
- func (o *OCIDir) BlobMount(ctx context.Context, refSrc ref.Ref, refTgt ref.Ref, d descriptor.Descriptor) error
- func (o *OCIDir) BlobPut(ctx context.Context, r ref.Ref, d descriptor.Descriptor, rdr io.Reader) (descriptor.Descriptor, error)
- func (o *OCIDir) Close(ctx context.Context, r ref.Ref) error
- func (o *OCIDir) GCLock(r ref.Ref)
- func (o *OCIDir) GCUnlock(r ref.Ref)
- func (o *OCIDir) ManifestDelete(ctx context.Context, r ref.Ref, opts ...scheme.ManifestOpts) error
- func (o *OCIDir) ManifestGet(ctx context.Context, r ref.Ref) (manifest.Manifest, error)
- func (o *OCIDir) ManifestHead(ctx context.Context, r ref.Ref) (manifest.Manifest, error)
- func (o *OCIDir) ManifestPut(ctx context.Context, r ref.Ref, m manifest.Manifest, ...) error
- func (o *OCIDir) Ping(ctx context.Context, r ref.Ref) (ping.Result, error)
- func (o *OCIDir) ReferrerList(ctx context.Context, r ref.Ref, opts ...scheme.ReferrerOpts) (referrer.ReferrerList, error)
- func (o *OCIDir) TagDelete(ctx context.Context, r ref.Ref) error
- func (o *OCIDir) TagList(ctx context.Context, r ref.Ref, opts ...scheme.TagOpts) (*tag.List, error)
- func (o *OCIDir) Throttle(r ref.Ref, put bool) []*throttle.Throttle
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OCIDir ¶
type OCIDir struct {
// contains filtered or unexported fields
}
OCIDir is used for accessing OCI Image Layouts defined as a directory
func (*OCIDir) BlobDelete ¶
func (o *OCIDir) BlobDelete(ctx context.Context, r ref.Ref, d descriptor.Descriptor) error
BlobDelete removes a blob from the repository. This method does not verify that blobs are unused. Calling the OCIDir.Close method to trigger the garbage collection is preferred.
func (*OCIDir) BlobGet ¶
func (o *OCIDir) BlobGet(ctx context.Context, r ref.Ref, d descriptor.Descriptor) (blob.Reader, error)
BlobGet retrieves a blob, returning a reader
func (*OCIDir) BlobHead ¶
func (o *OCIDir) BlobHead(ctx context.Context, r ref.Ref, d descriptor.Descriptor) (blob.Reader, error)
BlobHead verifies the existence of a blob, the reader contains the headers but no body to read
func (*OCIDir) BlobMount ¶
func (o *OCIDir) BlobMount(ctx context.Context, refSrc ref.Ref, refTgt ref.Ref, d descriptor.Descriptor) error
BlobMount attempts to perform a server side copy of the blob
func (*OCIDir) BlobPut ¶
func (o *OCIDir) BlobPut(ctx context.Context, r ref.Ref, d descriptor.Descriptor, rdr io.Reader) (descriptor.Descriptor, error)
BlobPut sends a blob to the repository, returns the digest and size when successful
func (*OCIDir) GCUnlock ¶ added in v0.5.0
GCUnlock removes a hold on GC of a ref, this must be done before the ref is closed
func (*OCIDir) ManifestDelete ¶
ManifestDelete removes a manifest, including all tags that point to that manifest
func (*OCIDir) ManifestGet ¶
ManifestGet retrieves a manifest from a repository
func (*OCIDir) ManifestHead ¶
ManifestHead gets metadata about the manifest (existence, digest, mediatype, size)
func (*OCIDir) ManifestPut ¶
func (o *OCIDir) ManifestPut(ctx context.Context, r ref.Ref, m manifest.Manifest, opts ...scheme.ManifestOpts) error
ManifestPut sends a manifest to the repository
func (*OCIDir) ReferrerList ¶ added in v0.4.3
func (o *OCIDir) ReferrerList(ctx context.Context, r ref.Ref, opts ...scheme.ReferrerOpts) (referrer.ReferrerList, error)
ReferrerList returns a list of referrers to a given reference
type Opts ¶
type Opts func(*ociConf)
Opts are used for passing options to ocidir
func WithFS ¶
WithFS allows the rwfs to be replaced The default is to use the OS, this can be used to sandbox within a folder This can also be used to pass an in-memory filesystem for testing or special use cases
func WithThrottle ¶ added in v0.5.0
WithThrottle provides a number of concurrent write actions (blob/manifest put)