Documentation
¶
Index ¶
- Constants
- type 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 (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 ¶
View Source
const ( AnnoFsCacheDomainID string = "fscache.domainid" AnnoFsCacheID string = "fscache.id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) ListLocked ¶
func (*Cache) SetIntances ¶
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 (*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 ¶
Click to show internal directories.
Click to hide internal directories.