Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clicommand/cache_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ var CacheRestoreCommand = cli.Command{
}

// Perform cache restore (logging happens inside)
return cache.Restore(ctx, l, apiClient, cacheCfg)
return cache.RunRestore(ctx, l, apiClient, cacheCfg)
},
}
2 changes: 1 addition & 1 deletion clicommand/cache_save.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ var CacheSaveCommand = cli.Command{
}

// Perform cache save (logging happens inside)
return cache.Save(ctx, l, apiClient, cacheCfg)
return cache.RunSave(ctx, l, apiClient, cacheCfg)
},
}
8 changes: 4 additions & 4 deletions internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ type cacheOps interface {
ListCaches() []configuration.Cache
}

// Save saves caches based on the provided configuration and logs results as
// RunSave saves caches based on the provided configuration and logs results as
// each cache is processed.
func Save(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
func RunSave(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
c, cacheIDs, err := newClient(l, apiClient, cfg)
if err != nil {
return err
Expand All @@ -52,9 +52,9 @@ func Save(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Confi
return saveWithClient(ctx, l, c, cacheIDs, cfg.Concurrency)
}

// Restore restores caches based on the provided configuration and logs results
// RunRestore restores caches based on the provided configuration and logs results
// as each cache is processed.
func Restore(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
func RunRestore(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
c, cacheIDs, err := newClient(l, apiClient, cfg)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/cache/client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package cache saves and restores cache archives via the Buildkite cache API.
//
// The CLI entry points are Save and Restore in cache.go. Internally they build
// The CLI entry points are RunSave and RunRestore in cache.go. Internally they build
// a client (a configured handle bundling the API client, storage bucket and
// the expanded cache definitions) and dispatch Save/Restore per cache ID.
package cache
Expand Down
Loading