Source File
retry_event.go
Belonging Package
github.com/gotd/td/telegram/downloader
package downloader// RetryEvent describes retried transient downloader error.type RetryEvent struct {// Operation identifies retry source.Operation string// Attempt is 1-based counter inside current retry loop.Attempt int// Err is the error that triggered retry.Err error}const (RetryOperationGetFile = "cdn.get_file"RetryOperationGetFileHashes = "cdn.get_file_hashes"RetryOperationReupload = "cdn.reupload"RetryOperationRefreshRedirect = "cdn.refresh_redirect"RetryOperationCreateClient = "cdn.create_client"RetryOperationReaderChunk = "reader.chunk"RetryOperationReaderHashes = "reader.hashes")// RetryHandler is called for every downloader error that is retried internally.type RetryHandler func(event RetryEvent)type retryReporter interface {reportRetry(operation string, attempt int, err error)}func ( schema, string, int, error) {if < 1 || == nil {return}, := .(retryReporter)if ! {return}.reportRetry(, , )}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |