mirror of
https://github.com/octoleo/restic.git
synced 2025-01-22 22:58:26 +00:00
swift/rest: Reduce number of connections
This commit is contained in:
parent
a89a7a783a
commit
58de8bf392
@ -211,7 +211,7 @@ var parseTests = []struct {
|
||||
Config: swift.Config{
|
||||
Container: "container17",
|
||||
Prefix: "",
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -221,7 +221,7 @@ var parseTests = []struct {
|
||||
Config: swift.Config{
|
||||
Container: "container17",
|
||||
Prefix: "prefix97",
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -230,7 +230,7 @@ var parseTests = []struct {
|
||||
Location{Scheme: "rest",
|
||||
Config: rest.Config{
|
||||
URL: parseURL("http://hostname.foo:1234/"),
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
// Config contains all configuration necessary to connect to a REST server.
|
||||
type Config struct {
|
||||
URL *url.URL
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"`
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
@ -21,7 +21,7 @@ func init() {
|
||||
// NewConfig returns a new Config with the default values filled in.
|
||||
func NewConfig() Config {
|
||||
return Config{
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ var configTests = []struct {
|
||||
}{
|
||||
{"rest:http://localhost:1234", Config{
|
||||
URL: parseURL("http://localhost:1234"),
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
}},
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ type Config struct {
|
||||
Prefix string
|
||||
DefaultContainerPolicy string
|
||||
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"`
|
||||
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
@ -36,7 +36,7 @@ func init() {
|
||||
// NewConfig returns a new config with the default values filled in.
|
||||
func NewConfig() Config {
|
||||
return Config{
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,21 +11,21 @@ var configTests = []struct {
|
||||
Config{
|
||||
Container: "cnt1",
|
||||
Prefix: "",
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
"swift:cnt2:/prefix",
|
||||
Config{Container: "cnt2",
|
||||
Prefix: "prefix",
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
"swift:cnt3:/prefix/longer",
|
||||
Config{Container: "cnt3",
|
||||
Prefix: "prefix/longer",
|
||||
Connections: 20,
|
||||
Connections: 5,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user