Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheName = map[CacheType]string{ CacheNone: "none", CacheMemory: "memory", CacheFile: "file", CacheDocker: "docker", CacheContainerd: "containerd", }
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
GetName() string
Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
Has(key string) bool
Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
}
type CacheStruct ¶
type CacheStruct struct {
Type CacheType
}
func (*CacheStruct) GetName ¶
func (c *CacheStruct) GetName() string
type ContainerdCache ¶
type ContainerdCache struct {
CacheStruct
// contains filtered or unexported fields
}
func NewContainerdCache ¶
func NewContainerdCache(namespace string) (*ContainerdCache, error)
func (*ContainerdCache) Get ¶
func (c *ContainerdCache) Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
func (*ContainerdCache) Has ¶
func (c *ContainerdCache) Has(key string) bool
func (*ContainerdCache) Put ¶
func (c *ContainerdCache) Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
type DockerCache ¶
type DockerCache struct {
CacheStruct
// contains filtered or unexported fields
}
func NewDockerCache ¶
func NewDockerCache() (*DockerCache, error)
func (*DockerCache) Get ¶
func (c *DockerCache) Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
func (*DockerCache) Has ¶
func (c *DockerCache) Has(key string) bool
func (*DockerCache) Put ¶
func (c *DockerCache) Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
type FileCache ¶
type FileCache struct {
CacheStruct
// contains filtered or unexported fields
}
func (*FileCache) Get ¶
func (c *FileCache) Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
func (*FileCache) Put ¶
func (c *FileCache) Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
type MemoryCache ¶
type MemoryCache struct {
CacheStruct
// contains filtered or unexported fields
}
func NewMemoryCache ¶
func NewMemoryCache() *MemoryCache
func (*MemoryCache) Get ¶
func (c *MemoryCache) Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
func (*MemoryCache) Has ¶
func (c *MemoryCache) Has(key string) bool
func (*MemoryCache) Put ¶
func (c *MemoryCache) Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
type NoneCache ¶
type NoneCache struct {
CacheStruct
}
func NewNoneCache ¶
func NewNoneCache() *NoneCache
func (*NoneCache) Get ¶
func (c *NoneCache) Get(key string, p tui.ProgressReader, callback func(reader io.ReadCloser) error) error
func (*NoneCache) Put ¶
func (c *NoneCache) Put(key string, p tui.ProgressReader, reader io.ReadCloser) error
Click to show internal directories.
Click to hide internal directories.