Skip to content

Commit 05daa10

Browse files
committed
refactor(cache): rename Save/Restore to RunSave/RunRestore
1 parent 369fe3f commit 05daa10

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

clicommand/cache_restore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ var CacheRestoreCommand = cli.Command{
9797
}
9898

9999
// Perform cache restore (logging happens inside)
100-
return cache.Restore(ctx, l, apiClient, cacheCfg)
100+
return cache.RunRestore(ctx, l, apiClient, cacheCfg)
101101
},
102102
}

clicommand/cache_save.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ var CacheSaveCommand = cli.Command{
9797
}
9898

9999
// Perform cache save (logging happens inside)
100-
return cache.Save(ctx, l, apiClient, cacheCfg)
100+
return cache.RunSave(ctx, l, apiClient, cacheCfg)
101101
},
102102
}

internal/cache/cache.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ type cacheOps interface {
3838
ListCaches() []configuration.Cache
3939
}
4040

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

55-
// Restore restores caches based on the provided configuration and logs results
55+
// RunRestore restores caches based on the provided configuration and logs results
5656
// as each cache is processed.
57-
func Restore(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
57+
func RunRestore(ctx context.Context, l logger.Logger, apiClient *api.Client, cfg Config) error {
5858
c, cacheIDs, err := newClient(l, apiClient, cfg)
5959
if err != nil {
6060
return err

internal/cache/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package cache saves and restores cache archives via the Buildkite cache API.
22
//
3-
// The CLI entry points are Save and Restore in cache.go. Internally they build
3+
// The CLI entry points are RunSave and RunRestore in cache.go. Internally they build
44
// a client (a configured handle bundling the API client, storage bucket and
55
// the expanded cache definitions) and dispatch Save/Restore per cache ID.
66
package cache

0 commit comments

Comments
 (0)