filesystem

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

type FileSystem interface {
	// Create the file system (e.g., mkfs)
	Create(ctx context.Context, complete bool) (bool, error)

	// Destroy the file system (e.g., wipefs)
	Destroy(ctx context.Context) (bool, error)

	// Activate the file system (e.g., mount Lustre target)
	Activate(ctx context.Context, complete bool) (bool, error)

	// Deactivate the file system (e.g., unmount Lustre target)
	Deactivate(ctx context.Context) (bool, error)

	// Mount the file system
	Mount(ctx context.Context, path string, complete bool) (bool, error)

	// Unmount the file system
	Unmount(ctx context.Context, path string) (bool, error)

	// Set the UID and GID for the file system
	SetPermissions(ctx context.Context, uid uint32, gid uint32, complete bool) (bool, error)
}

type KindFileSystem

type KindFileSystem struct {
	Log  logr.Logger
	Path string

	BlockDevice blockdevice.BlockDevice
}

func (*KindFileSystem) Activate

func (m *KindFileSystem) Activate(ctx context.Context, complete bool) (bool, error)

func (*KindFileSystem) Create

func (m *KindFileSystem) Create(ctx context.Context, complete bool) (bool, error)

func (*KindFileSystem) Deactivate

func (m *KindFileSystem) Deactivate(ctx context.Context) (bool, error)

func (*KindFileSystem) Destroy

func (m *KindFileSystem) Destroy(ctx context.Context) (bool, error)

func (*KindFileSystem) Mount

func (m *KindFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error)

func (*KindFileSystem) SetPermissions

func (m *KindFileSystem) SetPermissions(ctx context.Context, uid uint32, gid uint32, complete bool) (bool, error)

func (*KindFileSystem) Unmount

func (m *KindFileSystem) Unmount(ctx context.Context, path string) (bool, error)

type LustreFileSystem

type LustreFileSystem struct {
	Log         logr.Logger
	CommandArgs LustreFileSystemCommandArgs

	Name       string
	TargetType string
	MgsAddress string
	Index      int
	BackFs     string

	BlockDevice blockdevice.BlockDevice
}

func (*LustreFileSystem) Activate

func (l *LustreFileSystem) Activate(ctx context.Context, complete bool) (bool, error)

func (*LustreFileSystem) Create

func (l *LustreFileSystem) Create(ctx context.Context, complete bool) (bool, error)

func (*LustreFileSystem) Deactivate

func (l *LustreFileSystem) Deactivate(ctx context.Context) (bool, error)

func (*LustreFileSystem) Destroy

func (l *LustreFileSystem) Destroy(ctx context.Context) (bool, error)

func (*LustreFileSystem) Mount

func (l *LustreFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error)

func (*LustreFileSystem) SetPermissions

func (l *LustreFileSystem) SetPermissions(ctx context.Context, uid uint32, gid uint32, complete bool) (bool, error)

func (*LustreFileSystem) Unmount

func (l *LustreFileSystem) Unmount(ctx context.Context, path string) (bool, error)

type LustreFileSystemCommandArgs

type LustreFileSystemCommandArgs struct {
	Mkfs        string
	MountTarget string
	Mount       string

	Vars map[string]string
}

type MockFileSystem

type MockFileSystem struct {
	Log  logr.Logger
	Path string

	BlockDevice blockdevice.BlockDevice
}

func (*MockFileSystem) Activate

func (m *MockFileSystem) Activate(ctx context.Context, complete bool) (bool, error)

func (*MockFileSystem) Create

func (m *MockFileSystem) Create(ctx context.Context, complete bool) (bool, error)

func (*MockFileSystem) Deactivate

func (m *MockFileSystem) Deactivate(ctx context.Context) (bool, error)

func (*MockFileSystem) Destroy

func (m *MockFileSystem) Destroy(ctx context.Context) (bool, error)

func (*MockFileSystem) Mount

func (m *MockFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error)

func (*MockFileSystem) SetPermissions

func (m *MockFileSystem) SetPermissions(ctx context.Context, uid uint32, gid uint32, complete bool) (bool, error)

func (*MockFileSystem) Unmount

func (m *MockFileSystem) Unmount(ctx context.Context, path string) (bool, error)

type SimpleFileSystem

type SimpleFileSystem struct {
	Log         logr.Logger
	CommandArgs SimpleFileSystemCommandArgs

	Type        string
	MountTarget string
	TempDir     string

	BlockDevice blockdevice.BlockDevice
}

func (*SimpleFileSystem) Activate

func (f *SimpleFileSystem) Activate(ctx context.Context, complete bool) (bool, error)

func (*SimpleFileSystem) Create

func (f *SimpleFileSystem) Create(ctx context.Context, complete bool) (bool, error)

func (*SimpleFileSystem) Deactivate

func (f *SimpleFileSystem) Deactivate(ctx context.Context) (bool, error)

func (*SimpleFileSystem) Destroy

func (f *SimpleFileSystem) Destroy(ctx context.Context) (bool, error)

func (*SimpleFileSystem) Mount

func (f *SimpleFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error)

func (*SimpleFileSystem) SetPermissions

func (f *SimpleFileSystem) SetPermissions(ctx context.Context, userID uint32, groupID uint32, complete bool) (bool, error)

func (*SimpleFileSystem) Unmount

func (f *SimpleFileSystem) Unmount(ctx context.Context, path string) (bool, error)

type SimpleFileSystemCommandArgs

type SimpleFileSystemCommandArgs struct {
	Mkfs  string
	Mount string

	Vars map[string]string
}

Jump to

Keyboard shortcuts

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