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
```
13 lines
328 B
Go
13 lines
328 B
Go
package cli
|
|
|
|
type commandServerThrottle struct {
|
|
get commandServerThrottleGet
|
|
set commandServerThrottleSet
|
|
}
|
|
|
|
func (c *commandServerThrottle) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("throttle", "Control throttling parameters for a running server")
|
|
c.get.setup(svc, cmd)
|
|
c.set.setup(svc, cmd)
|
|
}
|