Documentation
¶
Index ¶
- Constants
- func CheckCriu(manager plugins.Manager) types.Check
- func CheckKernelSettings() types.Check
- func CheckVersion(manager plugins.Manager) types.Check
- func Checks(m plugins.Manager) types.Checks
- func PrepareDumpDir(next types.Dump) types.Dump
- func PrepareDumpDirForRestore(next types.Restore) types.Restore
- type File
- func (f *File) Close() (err error)
- func (f *File) Name() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) ReadAt(p []byte, off int64) (n int, err error)
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Readdirnames(n int) ([]string, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(p []byte) (n int, err error)
- func (f *File) WriteAt(p []byte, off int64) (n int, err error)
- func (f *File) WriteString(s string) (ret int, err error)
- type Fs
- func (fs *Fs) Chmod(name string, mode os.FileMode) error
- func (fs *Fs) Chown(name string, uid, gid int) error
- func (fs *Fs) Chtimes(name string, atime, mtime time.Time) error
- func (fs *Fs) Create(name string) (afero.File, error)
- func (fs *Fs) Mkdir(name string, perm os.FileMode) error
- func (fs *Fs) MkdirAll(path string, perm os.FileMode) error
- func (fs *Fs) Name() string
- func (fs *Fs) Open(name string) (afero.File, error)
- func (fs *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (fs *Fs) Remove(name string) error
- func (fs *Fs) RemoveAll(path string) error
- func (fs *Fs) Rename(oldname, newname string) error
- func (fs *Fs) Stat(name string) (os.FileInfo, error)
- type Mode
Constants ¶
View Source
const ( OPTIMAL_SOFT_LIMIT = 0 OPTIMAL_HARD_LIMIT = 0 OPTIMAL_MAX_SIZE = 4 * utils.MEBIBYTE )
View Source
const ( CAPTURE_SOCK = "streamer-capture.sock" SERVE_SOCK = "streamer-serve.sock" INIT_PROGRESS_MSG = "socket-init" STOP_LISTENER_MSG = "stop-listener" IMG_FILE_PATTERN = "img-*" IMG_FILE_FORMATTER = "img-%d" CONNECTION_TIMEOUT = 30 * time.Second DEFAULT_PARALLELISM = 4 PIPE_SIZE = 4 * utils.MEBIBYTE )
Variables ¶
This section is empty.
Functions ¶
func CheckKernelSettings ¶
func PrepareDumpDir ¶
This adapter sets up the cedana-image-streamer for directly streaming files to the dump directory.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
Implementation of the afero.File interface that uses streaming as the backend
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
Implementation of the afero.Fs filesystem interface that uses streaming as the backend using the streamer plugin.
func NewStreamingFs ¶
func NewStreamingFs( ctx context.Context, wg *sync.WaitGroup, streamerBinary string, dir string, parallelism int32, mode Mode, compressions ...string, ) (fs *Fs, wait func() error, err error)
For READ_ONLY mode, compression is automatically determined. For WRITE_ONLY mode, compression may be specified. Returns a wait function that *must* be called to tell the streamer to shutdown, and wait for it to finish streaming and exit gracefully. The wait function returns any IO errors that occurred during the streaming process.
Click to show internal directories.
Click to hide internal directories.