Documentation ¶
Overview ¶
Package cache defines the interface of a cache service
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAccessingObject = errors.New("accessing object") //nolint:revive ErrCreatingObject = errors.New("creating object") //nolint:revive ErrInitializingCache = errors.New("initializing cache") //nolint:revive ErrObjectNotFound = errors.New("object not found") //nolint:revive ErrInvalidURL = errors.New("invalid object URL") //nolint:revive )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Get retrieves an objects if exists in the cache or an error otherwise Get(ctx context.Context, id string) (Object, error) // Store stores the object and returns the metadata Store(ctx context.Context, id string, content io.Reader) (Object, error) // Download returns the content of the object Download(ctx context.Context, object Object) (io.ReadCloser, error) }
Cache defines an interface for storing blobs
Directories ¶
Path | Synopsis |
---|---|
Package api defines the interface to a cache server
|
Package api defines the interface to a cache server |
Package client implements a cache client
|
Package client implements a cache client |
Package file implements a file-backed cache
|
Package file implements a file-backed cache |
Package server implements a cache server
|
Package server implements a cache server |
Click to show internal directories.
Click to hide internal directories.