Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DlerURL ¶
type DlerURL struct { URL string // 下载的url SavePath string // 保存路径带后缀 OneThreading bool // 强制单线程 ThreadingCount int64 // 下载线程数 默认20 ThreadingDownloadSize int64 // 每个区块下载的大小 默认1048576 TimeOut time.Duration //下载超时时间 默认 180 秒 Method string // 请求下载地址的方式 默认GET Headers map[string]string // 请求下载地址的Headers 默认{} Client http.Client // 请求时的Cilent 默认{Timeout:time.Second * 180} Body io.Reader // 请求时的Body 默认nil IsBar bool // 是否显示进度条等信息 默认false ContentLength *int64 // 当前下载文件总字节数 Schedule *int64 // 当前已经下载的字节数 }
DlerURL 基础结构体
func (*DlerURL) InitHeaders ¶
InitHeaders 初始化Header
func (*DlerURL) IsClientEmpty ¶
IsClientEmpty 判断Client是否为空
Click to show internal directories.
Click to hide internal directories.