fs

package
v0.0.0-...-04f2983 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (persistapi.PersistDriver, error)

Init FS persist driver and return abstract PersistDriver

func MockFSInit

func MockFSInit() (persistapi.PersistDriver, error)

func MockRunStoragePath

func MockRunStoragePath() string

func MockRunVMStoragePath

func MockRunVMStoragePath() string

func MockStorageDestroy

func MockStorageDestroy()

func MockStorageRootPath

func MockStorageRootPath() string

func RootlessInit

func RootlessInit() (persistapi.PersistDriver, error)

Types

type FS

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

FS storage driver implementation

func (*FS) Destroy

func (fs *FS) Destroy(sandboxID string) error

Destroy removes everything from disk

func (*FS) FromDisk

FromDisk restores state for sandbox with name sid

func (*FS) GlobalRead

func (fs *FS) GlobalRead(relativePath string) ([]byte, error)

func (*FS) GlobalWrite

func (fs *FS) GlobalWrite(relativePath string, data []byte) error

func (*FS) Lock

func (fs *FS) Lock(sandboxID string, exclusive bool) (func() error, error)

func (*FS) Logger

func (fs *FS) Logger() *logrus.Entry

Logger returns a logrus logger appropriate for logging Store messages

func (*FS) RunStoragePath

func (fs *FS) RunStoragePath() string

func (*FS) RunVMStoragePath

func (fs *FS) RunVMStoragePath() string

func (*FS) ToDisk

func (fs *FS) ToDisk(ss persistapi.SandboxState, cs map[string]persistapi.ContainerState) (retErr error)

ToDisk sandboxState and containerState to disk

type MockFS

type MockFS struct {
	// inherit from FS. Overwrite if needed.
	*FS
}

type RootlessFS

type RootlessFS struct {
	// inherit from FS. Overwrite if needed.
	*FS
}

Jump to

Keyboard shortcuts

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