Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidatedActionResult ¶
If `hash` refers to a valid ActionResult with all the dependencies available in the CAS, return it and its serialized value. If not, return nil values. If something unexpected went wrong, return an error.
Types ¶
type Cache ¶
type Cache interface {
// Put stores a stream of `size` bytes from `rdr` into the cache. If `hash` is
// not the empty string, and the contents don't match it, a non-nil error is
// returned.
Put(kind EntryKind, hash string, size int64, rdr io.Reader) error
// Get returns an io.ReadCloser with the content of the cache item stored under `hash`
// and the number of bytes that can be read from it. If the item is not found, `rdr` is
// nil. If some error occurred when processing the request, then it is returned.
Get(kind EntryKind, hash string) (rdr io.ReadCloser, sizeBytes int64, err error)
// Contains returns true if the `hash` key exists in the cache.
Contains(kind EntryKind, hash string) (ok bool)
// MaxSize returns the maximum cache size in bytes.
MaxSize() int64
// Return the current size of the cache in bytes, and the number of
// items stored in the cache.
Stats() (int64, int)
}
Cache is the interface for a generic blob storage backend. Implementers should handle locking internally.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gcs provides cache implementation that proxies requests to/from Google Cloud Storage (GCS).
|
Package gcs provides cache implementation that proxies requests to/from Google Cloud Storage (GCS). |
|
Package http is a cache implementation that can proxy artifacts from/to another HTTP-based remote cache
|
Package http is a cache implementation that can proxy artifacts from/to another HTTP-based remote cache |
Click to show internal directories.
Click to hide internal directories.