fasthttp

package
v0.0.0-...-00fe4b5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFullTsDataWithRetryTimes

func DownloadFullTsDataWithRetryTimes(httpUrl, key string, isCheckMD5 bool, retryTimes int, timeOut time.Duration) ([]byte, error)

func DownloadTsDataWithRetryTimes

func DownloadTsDataWithRetryTimes(httpUrl string, start, end, retryTimes int, timeOut time.Duration) ([]byte, error)

func Get

func Get(httpUrl string) ([]byte, error)

func GetFileSize

func GetFileSize(httpUrL string) (*fasthttp.Response, error)

func GetFileSizeWithRetryTimes

func GetFileSizeWithRetryTimes(httpUrL string, retryTimes int) (uint64, error)

func GetRedirectUrlWithRetryTimes

func GetRedirectUrlWithRetryTimes(httpUrl string, retryTimes int) (string, error)

func GetTsSize

func GetTsSize(httpUrL string) (*fasthttp.Response, error)

func GetTsSizeWithRetryTimes

func GetTsSizeWithRetryTimes(httpUrL string, retryTimes int) (uint64, error)

func RetryDoHTTPWithEmptyBody

func RetryDoHTTPWithEmptyBody(fn BodyHTTPFunc, retries int, sleep time.Duration) ([]byte, error)

func RetryDoHTTPWithErr

func RetryDoHTTPWithErr(fn HTTPFunc, retries int, sleep time.Duration) (*fasthttp.Response, error)

func RetryDoWithEmptyBody

func RetryDoWithEmptyBody(fn BodyFunc, retries int, sleep time.Duration) ([]byte, error)

func RetryDoWithErr

func RetryDoWithErr(fn Func, retries int, sleep time.Duration) error

Types

type BodyFunc

type BodyFunc func() ([]byte, error)

type BodyHTTPFunc

type BodyHTTPFunc func() ([]byte, error)

type Func

type Func func() error

type HTTPFunc

type HTTPFunc func() (*fasthttp.Response, error)

Jump to

Keyboard shortcuts

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