go-sdk
go-sdk copied to clipboard
golang sdk
KODO-19899 KODO-19756 KODO-20293 KODO-20294
下面这段代码在本地正常运行 ``` mac := auth.New(accessKey, secretKey) cfg := storage.Config{ // 是否使用https域名进行资源管理 UseHTTPS: false, } bm := storage.NewBucketManager(mac, &cfg) entries, _, _, _, err := bm.ListFiles(bucket, prefix, delimiter, "", limit) if...
在操作 BucketManager 相关方法时,很多方法没法传递 `context.Context` ,方法内部直接使用 `context.Background()` ,这很难控制上下文,如:超时,链路追踪等,如何可以设置上下文控制?? 示例: - https://github.com/qiniu/go-sdk/blob/b4c49d3185d2795d9e186193930eae235e66d4ef/storage/bucket.go#L426 - https://github.com/qiniu/go-sdk/blob/b4c49d3185d2795d9e186193930eae235e66d4ef/storage/bucket.go#L444 - https://github.com/qiniu/go-sdk/blob/b4c49d3185d2795d9e186193930eae235e66d4ef/storage/bucket.go#L456 文件中还有很多。。。
Bumps gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0. [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a...
sdk中GetStreamLiveStatusResponse结构体中少了playCount等信息 与接口文档中返回的信息描述不相符:https://developer.qiniu.com/pili/2776/live-broadcast-of-real-time-information
v7.9.7 上传问题
从v7.9.5升级到最新 v7.9.7 后, 服务频繁OOM, 查看最近SDK源码后,发现新增了 `ioutil.ReadAll`, 将用户上传的数据一次性读入内存. 针对小文件还好,稍大一点的文件就非常占用内存.原先只需要不到100M内存的服务,现在至少需要1G内存. (而且这个策略还额外造成了整体上传的延时) 感觉明显是一个倒退,如果是为了重试,希望可以把是否重试的开关交给用户选择.
### go ``` import ( "bytes" "context" "encoding/json" "errors" "fmt" "github.com/qiniu/go-sdk/v7/auth" "io" "log" "net/http" "regexp" "strings" "time" "github.com/qiniu/go-sdk/auth/v7" ) type SevenCow struct { cred *auth.Credentials Ak string Sk string host...