Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxReconnects bounds the attempts in a row that bring no bytes: // a read broken off, or a request to resume it that fails. Progress resets // the count. DefaultMaxReconnects = 8 // DefaultRetryBaseDelay is the wait before the second attempt in a row; // each one after that waits twice as long, up to DefaultRetryMaxDelay. DefaultRetryBaseDelay = time.Second DefaultRetryMaxDelay = 32 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Generation pins the object generation to read. Zero reads the live one,
// and pins whatever generation that turns out to be.
Generation int64
// Offset is the first byte read.
Offset int64
// Length is how many bytes are read from Offset; zero or less reads to the
// end of the object.
Length int64
MaxReconnects int
RetryBaseDelay time.Duration
RetryMaxDelay time.Duration
FetchOptions []fetch_config.Option
}
type Option ¶
type Option func(*Config)
func WithFetchOptions ¶
func WithFetchOptions(fetchOptions ...fetch_config.Option) Option
func WithGeneration ¶
func WithMaxReconnects ¶
Click to show internal directories.
Click to hide internal directories.