Documentation
¶
Overview ¶
Package proxycache registers the "proxycache" blobstore storage type, which uses a provided blobstore as a cache for a second origin blobstore.
If the provided maxCacheBytes is unspecified, the default is 512MB.
Example config:
"/cache/": { "handler": "storage-proxycache", "handlerArgs": { "origin": "/cloud-blobs/", "cache": "/local-ssd/", "maxCacheBytes": 536870912 } },
Index ¶
- type Storage
- func (sto *Storage) EnumerateBlobs(ctx context.Context, dest chan<- blob.SizedRef, after string, limit int) error
- func (sto *Storage) Fetch(ctx context.Context, b blob.Ref) (rc io.ReadCloser, size uint32, err error)
- func (sto *Storage) ReceiveBlob(ctx context.Context, br blob.Ref, src io.Reader) (blob.SizedRef, error)
- func (sto *Storage) RemoveBlobs(ctx context.Context, blobs []blob.Ref) error
- func (sto *Storage) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error
- func (sto *Storage) SubFetch(ctx context.Context, ref blob.Ref, offset, length int64) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage implements the "proxycache" blob storage.
func New ¶
New returns a proxycache blob storage that reads from cache, then origin, populating cache as needed, up to a total of maxBytes.
func (*Storage) EnumerateBlobs ¶
func (*Storage) ReceiveBlob ¶
func (*Storage) RemoveBlobs ¶
Click to show internal directories.
Click to hide internal directories.