mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
Supported are:
```
$ kopia throttle set \
--download-bytes-per-second=N | unlimited
--upload-bytes-per-second=N | unlimited
--read-requests-per-second=N | unlimited
--write-requests-per-second=N | unlimited
--list-requests-per-second=N | unlimited
--concurrent-reads=N | unlimited
--concurrent-writes=N | unlimited
```
To change parameters of a running server use:
```
$ kopia server throttle set \
--address=<server-url> \
--server-control-password=<password> \
--download-bytes-per-second=N | unlimited
--upload-bytes-per-second=N | unlimited
--read-requests-per-second=N | unlimited
--write-requests-per-second=N | unlimited
--list-requests-per-second=N | unlimited
--concurrent-reads=N | unlimited
--concurrent-writes=N | unlimited
```
14 lines
340 B
Go
14 lines
340 B
Go
package cli
|
|
|
|
type commandRepositoryThrottle struct {
|
|
get commandRepositoryThrottleGet
|
|
set commandRepositoryThrottleSet
|
|
}
|
|
|
|
func (c *commandRepositoryThrottle) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("throttle", "Commands to manipulate throttle configuration")
|
|
|
|
c.get.setup(svc, cmd)
|
|
c.set.setup(svc, cmd)
|
|
}
|