ocilarge

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadLargeBlob

func DownloadLargeBlob(ctx context.Context, reg oci.Interface, repo string, dgst oci.Digest) (oci.BlobReader, error)

DownloadLargeBlob downloads a blob using multiple concurrent HTTP range requests to saturate the available bandwidth. It returns a BlobReader whose Read calls yield the bytes in the correct order with full digest verification at EOF.

Internally the function:

  1. Resolves the blob to obtain its size and digest.
  2. Issues a small "probe" range request and measures the throughput.
  3. Derives an optimal chunk size from the observed bandwidth.
  4. Launches a pipeline of concurrent fetchers that prefetch chunks into an ordered cache so the next chunks are always ready when the caller reads.

func UploadLargeBlob

func UploadLargeBlob(ctx context.Context, reg oci.Interface, repo string, f io.ReadCloser, chunkSize int) (oci.Descriptor, error)

UploadLargeBlob uploads a large blob in chunks with retries so that uploads can be resumed in case of network error

Types

This section is empty.

Jump to

Keyboard shortcuts

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