Documentation ¶
Overview ¶
Package cacher defines utilities for saving and restoring caches from Google Cloud storage.
Index ¶
- type Cacher
- func (c *Cacher) Debug(val bool)
- func (c *Cacher) HashFiles(files []string) (string, error)
- func (c *Cacher) HashGlob(pattern string) (string, error)
- func (c *Cacher) Restore(ctx context.Context, i *RestoreRequest) (retErr error)
- func (c *Cacher) Save(ctx context.Context, i *SaveRequest) (retErr error)
- type RestoreRequest
- type SaveRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher struct {
// contains filtered or unexported fields
}
Cacher is responsible for saving and restoring caches.
func (*Cacher) HashFiles ¶ added in v0.1.1
HashFiles hashes the list of file and returns the hex-encoded SHA256.
type RestoreRequest ¶
type RestoreRequest struct { // Bucket is the name of the bucket from which to cache. Bucket string // Keys is the ordered list of keys to restore. Keys []string // Dir is the directory on disk to cache. Dir string }
RestoreRequest is used as input to the Restore operation.
type SaveRequest ¶
type SaveRequest struct { // Bucket is the name of the bucket from which to cache. Bucket string // Key is the cache key. Key string // Dir is the directory on disk to cache. Dir string }
SaveRequest is used as input to the Save operation.
Click to show internal directories.
Click to hide internal directories.