Documentation
¶
Index ¶
- func HeadBytes(ctx context.Context, p provider.Provider, key string, n int64) ([]byte, *provider.ObjectMeta, error)
- func HeadBytesMulti(ctx context.Context, p provider.Provider, keys []string, n int64, parallel int) <-chan HeadBytesResult
- func HeadBytesWithPartial(ctx context.Context, p provider.Provider, key string, n int64) ([]byte, *provider.ObjectMeta, error)
- type HeadBytesOptions
- type HeadBytesResult
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 HeadBytesResult ¶
type HeadBytesResult struct {
Key string
Meta *provider.ObjectMeta
Data []byte
Err error
}
Click to show internal directories.
Click to hide internal directories.