sftp: Limit concurrent backend operations

This commit is contained in:
Michael Eischer 2021-08-07 19:56:59 +02:00
parent cd783358d3
commit ece06f125e
6 changed files with 112 additions and 41 deletions

View file

@ -138,9 +138,10 @@ var parseTests = []struct {
"sftp:user@host:/srv/repo",
Location{Scheme: "sftp",
Config: sftp.Config{
User: "user",
Host: "host",
Path: "/srv/repo",
User: "user",
Host: "host",
Path: "/srv/repo",
Connections: 5,
},
},
},
@ -148,9 +149,10 @@ var parseTests = []struct {
"sftp:host:/srv/repo",
Location{Scheme: "sftp",
Config: sftp.Config{
User: "",
Host: "host",
Path: "/srv/repo",
User: "",
Host: "host",
Path: "/srv/repo",
Connections: 5,
},
},
},
@ -158,9 +160,10 @@ var parseTests = []struct {
"sftp://user@host/srv/repo",
Location{Scheme: "sftp",
Config: sftp.Config{
User: "user",
Host: "host",
Path: "srv/repo",
User: "user",
Host: "host",
Path: "srv/repo",
Connections: 5,
},
},
},
@ -168,9 +171,10 @@ var parseTests = []struct {
"sftp://user@host//srv/repo",
Location{Scheme: "sftp",
Config: sftp.Config{
User: "user",
Host: "host",
Path: "/srv/repo",
User: "user",
Host: "host",
Path: "/srv/repo",
Connections: 5,
},
},
},