Source File
cdn_provider.go
Belonging Package
github.com/gotd/td/telegram/downloader
package downloaderimport ()// cdnClient is a Client extended with CDNProvider.type cdnClient struct {Clientprovider CDNProvider}func ( cdnClient) ( context.Context, int, int64) (CDN, io.Closer, error) {return .provider.CDN(, , )}// WithCDNProvider returns Client that serves CDN redirects through given// provider, e.g. telegram.Client.CDNProvider.//// Without CDNProvider, downloads through plain clients (like// tg.NewClient(pool)) silently fall back to master DC, even with// Downloader.WithAllowCDN(true).func ( Client, CDNProvider) Client {if == nil {return}return cdnClient{Client: , provider: }}
![]() |
The pages are generated with Golds v0.8.7. (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. |