mirror of
https://github.com/kopia/kopia.git
synced 2026-01-23 05:47:57 -05:00
20 lines
437 B
Go
20 lines
437 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/internal/serverapi"
|
|
)
|
|
|
|
var (
|
|
serverRefreshCommand = serverCommands.Command("refresh", "Refresh the cache in Kopia server to observe new sources, etc.")
|
|
)
|
|
|
|
func init() {
|
|
serverRefreshCommand.Action(serverAction(runServerRefresh))
|
|
}
|
|
|
|
func runServerRefresh(ctx context.Context, cli *serverapi.Client) error {
|
|
return cli.Post("refresh", &serverapi.Empty{}, &serverapi.Empty{})
|
|
}
|