common

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitPathStyle added in v1.1.8

func SplitPathStyle(locationPath, root string) (bucket, prefix string, err error)

SplitPathStyle returns the bucket and the prefix of a path-style location. The location path names the bucket and root is the prefix inside it. A root that starts with that bucket, or a location without a bucket, keeps the older reading of root as /<bucket>/<prefix>.

func SplitVirtualHost

func SplitVirtualHost(hostname, endpoint string) (bucket, host string, err error)

func VirtualHostPrefix added in v1.1.8

func VirtualHostPrefix(locationPath, root string) (string, error)

VirtualHostPrefix returns the prefix of a virtual-host location, where the bucket is in the hostname. The location path and root may both carry the prefix, but must then agree.

Types

type RetryReader added in v1.1.6

type RetryReader struct {
	// contains filtered or unexported fields
}

func NewRetryReader added in v1.1.6

func NewRetryReader(ctx context.Context, expected int64, get func(offset int64) (io.ReadCloser, error)) *RetryReader

NewRetryReader streams the result of get(0) and in case of a transient failure during the read retries get(offset) until max retries or until expected||EOF

func (*RetryReader) Close added in v1.1.6

func (r *RetryReader) Close() error

func (*RetryReader) Read added in v1.1.6

func (r *RetryReader) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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