mirror of
https://github.com/kopia/kopia.git
synced 2026-01-01 19:17:56 -05:00
* fixed godot linter errors * reformatted source with gofumpt * disabled some linters * fixed nolintlint warnings * fixed gci warnings * lint: fixed 'nestif' warnings * lint: fixed 'exhaustive' warnings * lint: fixed 'gocritic' warnings * lint: fixed 'noctx' warnings * lint: fixed 'wsl' warnings * lint: fixed 'goerr113' warnings * lint: fixed 'gosec' warnings * lint: upgraded linter to 1.30.0 * lint: more 'exhaustive' warnings Co-authored-by: Nick <nick@kasten.io>
19 lines
475 B
Go
19 lines
475 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/internal/apiclient"
|
|
"github.com/kopia/kopia/internal/serverapi"
|
|
)
|
|
|
|
var serverFlushCommand = serverCommands.Command("flush", "Flush the state of Kopia server to persistent storage, etc.")
|
|
|
|
func init() {
|
|
serverFlushCommand.Action(serverAction(runServerFlush))
|
|
}
|
|
|
|
func runServerFlush(ctx context.Context, cli *apiclient.KopiaAPIClient) error {
|
|
return cli.Post(ctx, "flush", &serverapi.Empty{}, &serverapi.Empty{})
|
|
}
|