Documentation
¶
Overview ¶
Package cache provides content-addressable build artifact caching for Helix Cluster OS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface {
Put(digest string, data []byte) error
Get(digest string) ([]byte, error)
Has(digest string) bool
Delete(digest string) error
}
Cache is a content-addressable storage cache for build artifacts.
type DiskCache ¶
type DiskCache struct {
// contains filtered or unexported fields
}
DiskCache is a filesystem-backed Cache implementation.
func NewDiskCache ¶
NewDiskCache creates a new DiskCache rooted at the given directory.
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache is an in-memory Cache implementation.
func (*MemoryCache) Delete ¶
func (c *MemoryCache) Delete(digest string) error
Delete removes a digest.
func (*MemoryCache) Get ¶
func (c *MemoryCache) Get(digest string) ([]byte, error)
Get retrieves data by digest.
func (*MemoryCache) Has ¶
func (c *MemoryCache) Has(digest string) bool
Has checks if a digest exists.
Click to show internal directories.
Click to hide internal directories.