cache

package
v0.0.0-...-3cab0da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	AddSnapshot(imageID string, blobs []string) error
	DelSnapshot(imageID string) error
	GC(delFunc func(blob string) error) ([]string, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(opt Opt) (*Manager, error)

func (*Manager) AddSnapshot

func (m *Manager) AddSnapshot(imageID string, blobs []string) error

func (*Manager) CacheDir

func (m *Manager) CacheDir() string

func (*Manager) DelSnapshot

func (m *Manager) DelSnapshot(imageID string) error

func (*Manager) SchedGC

func (m *Manager) SchedGC()

type Opt

type Opt struct {
	CacheDir string
	Period   time.Duration
	Database *store.Database
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(cacheDir string) *Store

func (*Store) DelBlob

func (cs *Store) DelBlob(blob string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL