Documentation ¶
Index ¶
- Constants
- type Filesystem
- func (fs *Filesystem) BootstrapFile(id string) (string, error)
- func (fs *Filesystem) CacheUsage(ctx context.Context, blobDigest string) (snapshots.Usage, error)
- func (fs *Filesystem) DaemonBacked() bool
- func (fs *Filesystem) IsStargzDataLayer(ctx context.Context, labels map[string]string) (bool, string, string, *stargz.Blob)
- func (fs *Filesystem) MergeStargzMetaLayer(ctx context.Context, s storage.Snapshot) error
- func (fs *Filesystem) Mount(snapshotID string, labels map[string]string) (err error)
- func (fs *Filesystem) MountPoint(snapshotID string) (string, error)
- func (fs *Filesystem) PrepareStargzMetaLayer(ctx context.Context, blob *stargz.Blob, ref, layerDigest string, ...) error
- func (fs *Filesystem) RemoveCache(blobDigest string) error
- func (fs *Filesystem) StargzEnabled() bool
- func (fs *Filesystem) StargzLayer(labels map[string]string) bool
- func (fs *Filesystem) Teardown(ctx context.Context) error
- func (fs *Filesystem) TryStopSharedDaemon()
- func (fs *Filesystem) Umount(ctx context.Context, snapshotID string) error
- func (fs *Filesystem) UpperPath(id string) string
- func (fs *Filesystem) WaitUntilReady(snapshotID string) error
- type NewFSOpt
Constants ¶
const ( BootstrapFile string = "image/image.boot" LegacyBootstrapFile string = "image.boot" DummyMountpoint string = "/dummy" )
const MaxSuperBlockSize = 8 * 1024
RafsV6 layout: 1k + SuperBlock(128) + SuperBlockExtended(256) RafsV5 layout: 8K superblock So we only need to read the MaxSuperBlockSize size to include both v5 and v6 superblocks
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem struct { // Managing all daemons serving filesystem. Manager *manager.Manager // contains filtered or unexported fields }
func NewFileSystem ¶
func NewFileSystem(ctx context.Context, opt ...NewFSOpt) (*Filesystem, error)
NewFileSystem initialize Filesystem instance It does mount image layers by starting nydusd doing FUSE mount or not.
func (*Filesystem) BootstrapFile ¶
func (fs *Filesystem) BootstrapFile(id string) (string, error)
func (*Filesystem) CacheUsage ¶
How much space the layer/blob cache filesystem is occupying The blob digest mush have `sha256:` prefixed, otherwise, throw errors.
func (*Filesystem) DaemonBacked ¶
func (fs *Filesystem) DaemonBacked() bool
func (*Filesystem) IsStargzDataLayer ¶
func (*Filesystem) MergeStargzMetaLayer ¶
func (*Filesystem) Mount ¶
func (fs *Filesystem) Mount(snapshotID string, labels map[string]string) (err error)
Mount will be called when containerd snapshotter prepare remote snapshotter this method will fork nydus daemon and manage it in the internal store, and indexed by snapshotID It must set up all necessary resources during Mount procedure and revoke any step if necessary.
func (*Filesystem) MountPoint ¶
func (fs *Filesystem) MountPoint(snapshotID string) (string, error)
func (*Filesystem) PrepareStargzMetaLayer ¶
func (*Filesystem) RemoveCache ¶
func (fs *Filesystem) RemoveCache(blobDigest string) error
func (*Filesystem) StargzEnabled ¶
func (fs *Filesystem) StargzEnabled() bool
func (*Filesystem) StargzLayer ¶
func (fs *Filesystem) StargzLayer(labels map[string]string) bool
func (*Filesystem) Teardown ¶
func (fs *Filesystem) Teardown(ctx context.Context) error
Try to stop all the running daemons if they are not referenced by any snapshots Clean up resources along with the daemons.
func (*Filesystem) TryStopSharedDaemon ¶
func (fs *Filesystem) TryStopSharedDaemon()
func (*Filesystem) Umount ¶
func (fs *Filesystem) Umount(ctx context.Context, snapshotID string) error
func (*Filesystem) UpperPath ¶
func (fs *Filesystem) UpperPath(id string) string
func (*Filesystem) WaitUntilReady ¶
func (fs *Filesystem) WaitUntilReady(snapshotID string) error
WaitUntilReady wait until daemon ready by snapshotID, it will wait until nydus domain socket established and the status of nydusd daemon must be ready
type NewFSOpt ¶
type NewFSOpt func(d *Filesystem) error