Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { Has(key string) (bool, error) Put(key string, reader io.Reader) error Get(key string) (io.Reader, error) String() string }
Cacher represents a cache
func NewLocalCache ¶
NewLocalCache creates a new LocalCache
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
LocalCache represents a local cache instance
func (*LocalCache) Get ¶
func (cache *LocalCache) Get(key string) (io.Reader, error)
Get fetches something from the cache
func (*LocalCache) Has ¶
func (cache *LocalCache) Has(key string) (bool, error)
Has indicates whether a LocalCache contains a given key or not
func (*LocalCache) Put ¶
func (cache *LocalCache) Put(key string, reader io.Reader) error
Put stores something in the cache
func (*LocalCache) String ¶
func (cache *LocalCache) String() string
type MinioCache ¶
type MinioCache struct {
// contains filtered or unexported fields
}
MinioCache represents a Minio Cache instance
func NewMinioCache ¶
func NewMinioCache(endpoint string, accessKeyID string, secretAccessKey string, bucket string, useTLS bool) *MinioCache
NewMinioCache creates a new Minio Cache
func (*MinioCache) Get ¶
func (cache *MinioCache) Get(key string) (io.Reader, error)
Get fetches something from the cache
func (*MinioCache) Has ¶
func (cache *MinioCache) Has(key string) (bool, error)
Has determines whether or not Minio contains a given key
func (*MinioCache) Put ¶
func (cache *MinioCache) Put(key string, reader io.Reader) error
Put stores something in the cache TODO: Test with inputs larger than 128 MiB
func (*MinioCache) String ¶
func (cache *MinioCache) String() string
Click to show internal directories.
Click to hide internal directories.