Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultTimeout is the default timeout for fetching the URL. DefaultTimeout = 60 * time.Second // DefaultBackOff is the default backoff strategy for fetching the URL. DefaultBackOff = &backoff.StopBackOff{} )
Functions ¶
func NewDecompressionReader ¶
func NewDecompressionReader(r io.ReadCloser) (io.ReadCloser, error)
NewDecompressionReader will return a new reader transparently doing decompression of GZip, BZip2, and ZStd.
Types ¶
type Option ¶
type Option func(*params)
Option is an option for opening a URL.
func WithBackoff ¶
func WithBackoff(backOff backoff.BackOff) Option
WithBackoff will set the backoff strategy for the fetch operation.
func WithTimeout ¶
WithTimeout will set the timeout duration for the fetch operation.
Click to show internal directories.
Click to hide internal directories.