content

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadBytes

func HeadBytes(ctx context.Context, p provider.Provider, key string, n int64) ([]byte, *provider.ObjectMeta, error)

HeadBytes reads the first n bytes of an object.

Behavior: - Always performs a Head first to capture metadata. - Uses GetRange when supported. - Falls back to GetObject and reads up to n bytes.

func HeadBytesMulti

func HeadBytesMulti(ctx context.Context, p provider.Provider, keys []string, n int64, parallel int) <-chan HeadBytesResult

HeadBytesMulti reads the first n bytes from many objects in parallel.

Results are sent on the returned channel as they complete.

func HeadBytesWithPartial

func HeadBytesWithPartial(ctx context.Context, p provider.Provider, key string, n int64) ([]byte, *provider.ObjectMeta, error)

HeadBytesWithPartial retains bytes delivered before a read error for accurate probe accounting. It makes the same provider requests as HeadBytes.

Types

type HeadBytesOptions

type HeadBytesOptions struct {
	Parallel int
	Bytes    int64
}

type HeadBytesResult

type HeadBytesResult struct {
	Key  string
	Meta *provider.ObjectMeta
	Data []byte
	Err  error
}

Jump to

Keyboard shortcuts

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