Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable calculate digest #656

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/config/peerhost_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"net"
"time"

"d7y.io/dragonfly/v2/pkg/basic/dfnet"
"golang.org/x/time/rate"

"d7y.io/dragonfly/v2/client/clientutil"
"d7y.io/dragonfly/v2/pkg/basic"
"d7y.io/dragonfly/v2/pkg/basic/dfnet"
"d7y.io/dragonfly/v2/pkg/util/net/iputils"
)

Expand Down Expand Up @@ -61,6 +61,7 @@ var peerHostConfig = DaemonOption{
NetTopology: "",
},
Download: DownloadOption{
CalculateDigest: true,
PieceDownloadTimeout: 30 * time.Second,
TotalRateLimit: clientutil.RateLimit{
Limit: rate.Limit(DefaultTotalDownloadLimit),
Expand Down
3 changes: 2 additions & 1 deletion client/config/peerhost_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"net"
"time"

"d7y.io/dragonfly/v2/pkg/basic/dfnet"
"golang.org/x/time/rate"

"d7y.io/dragonfly/v2/client/clientutil"
"d7y.io/dragonfly/v2/pkg/basic"
"d7y.io/dragonfly/v2/pkg/basic/dfnet"
"d7y.io/dragonfly/v2/pkg/util/net/iputils"
)

Expand Down Expand Up @@ -61,6 +61,7 @@ var peerHostConfig = DaemonOption{
NetTopology: "",
},
Download: DownloadOption{
CalculateDigest: true,
PieceDownloadTimeout: 30 * time.Second,
TotalRateLimit: clientutil.RateLimit{
Limit: rate.Limit(DefaultTotalDownloadLimit),
Expand Down
2 changes: 2 additions & 0 deletions docs/en/config/dfget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ host:

# download service option
download:
# calculate digest when transfer files, set false to save memory
calculateDigest: true
# total download limit per second
totalRateLimit: 200Mi
# per peer task download limit per second
Expand Down
2 changes: 2 additions & 0 deletions docs/zh-CN/config/dfget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ host:

# 下载服务选项
download:
# 是否计算文件摘要,设置为 false 的话,会节省内存
calculateDigest: true
# 总下载限速
totalRateLimit: 200Mi
# 单个任务下载限速
Expand Down