Files
kopia/cli/command_server_throttle.go
Jarek Kowalski 99eeb3c063 feat(cli): added CLI for controlling throttler (#1956)
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
```
2022-05-18 01:27:06 -07:00

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)
}