package cache

import "github.com/containerd/nydus-snapshotter/pkg/cache"

Index

Types

type Manager

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

Disk cache manager for fusedev.

func NewManager

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

func (*Manager) CacheDir

func (m *Manager) CacheDir() string

func (*Manager) CacheUsage

func (m *Manager) CacheUsage(ctx context.Context, blobID string) (snapshots.Usage, error)

Report each blob disk usage TODO: For fscache cache files, the cache files are managed by nydusd and Linux kernel We don't know how it manages cache files. A method to address this is to query nydusd. So we can't report cache usage in the case of fscache now

func (*Manager) RemoveBlobCache

func (m *Manager) RemoveBlobCache(blobID string) error

type Opt

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

Source Files

manager.go

Version
v0.15.1 (latest)
Published
Jan 26, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
1 day ago

Tools for package owners.