Files
kopia/cli/command_repository_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

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