package rafs
import "github.com/containerd/nydus-snapshotter/pkg/rafs"
Index ¶
- Constants
- type Cache
- func NewRafsCache() Cache
- func (rs *Cache) Add(r *Rafs)
- func (rs *Cache) Get(snapshotID string) *Rafs
- func (rs *Cache) Head() *Rafs
- func (rs *Cache) Len() int
- func (rs *Cache) List() map[string]*Rafs
- func (rs *Cache) ListLocked() map[string]*Rafs
- func (rs *Cache) Lock()
- func (rs *Cache) Remove(snapshotID string)
- func (rs *Cache) SetIntances(instances map[string]*Rafs)
- func (rs *Cache) Unlock()
- type NewRafsOpt
- type Rafs
- func NewRafs(snapshotID, imageID, fsDriver string) (*Rafs, error)
- func (r *Rafs) AddAnnotation(k, v string)
- func (r *Rafs) BootstrapFile() (string, error)
- func (r *Rafs) FscacheWorkDir() string
- func (r *Rafs) GetFsDriver() string
- func (r *Rafs) GetMountpoint() string
- func (r *Rafs) GetSnapshotDir() string
- func (r *Rafs) RelaMountpoint() string
- func (r *Rafs) SetMountpoint(mp string)
Constants ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
var RafsGlobalCache Cache
Global cache to hold all RAFS instances.
func NewRafsCache ¶
func NewRafsCache() Cache
func (*Cache) Add ¶
func (*Cache) Get ¶
func (*Cache) Head ¶
func (*Cache) Len ¶
func (*Cache) List ¶
func (*Cache) ListLocked ¶
func (*Cache) Lock ¶
func (rs *Cache) Lock()
func (*Cache) Remove ¶
func (*Cache) SetIntances ¶
func (*Cache) Unlock ¶
func (rs *Cache) Unlock()
type NewRafsOpt ¶
type Rafs ¶
type Rafs struct { Seq uint64 ImageID string // Usually is the image reference DaemonID string FsDriver string SnapshotID string // Given by containerd SnapshotDir string // 1. A host kernel EROFS/TARFS mountpoint // 2. Absolute path to each rafs instance root directory. Mountpoint string Annotations map[string]string }
The whole struct will be persisted
func NewRafs ¶
func (*Rafs) AddAnnotation ¶
func (*Rafs) BootstrapFile ¶
func (*Rafs) FscacheWorkDir ¶
Blob caches' chunk bitmap and meta headers are stored here.
func (*Rafs) GetFsDriver ¶
func (*Rafs) GetMountpoint ¶
Get top level mount point for the RAFS instance:
- FUSE with dedicated mode: the FUSE filesystem mount point, the RAFS filesystem is directly mounted at the mount point.
- FUSE with shared mode: the FUSE filesystem mount point, the RAFS filesystem is mounted at a subdirectory under the mount point.
- EROFS/fscache: the EROFS filesystem mount point.
func (*Rafs) GetSnapshotDir ¶
func (*Rafs) RelaMountpoint ¶
Get the sub-directory under a FUSE mount point to mount a RAFS instance. For a nydusd daemon in shared mode, one or more RAFS filesystem instances can be mounted to sub-directories of the FUSE filesystem. This method returns the subdirectory for a RAFS filesystem instance.
func (*Rafs) SetMountpoint ¶
Source Files ¶
- Version
- v0.15.1 (latest)
- Published
- Jan 26, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 2 weeks ago –
Tools for package owners.