bcache

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bcache

type Bcache interface {
	// CreateBcache create bcache
	CreateBcache(dev, cacheDev string, block, bucket string) error
	RemoveBcache(bcacheInfo *types.BcacheDeviceInfo) error

	// GetDeviceBcache
	GetDeviceBcache(dev string) (*types.BcacheDeviceInfo, error)
	RegisterDevice(dev ...string) error
	ShowDevice(dev string) (*types.BcacheDeviceInfo, error)

	SetCacheMode(bcache string, cachePolicy string) error
}

type BcacheImplement

type BcacheImplement struct {
	Executor exec.Executor
}

func (*BcacheImplement) CreateBcache

func (bi *BcacheImplement) CreateBcache(dev, cacheDev string, block, bucket string) error

func (*BcacheImplement) GetDeviceBcache

func (bi *BcacheImplement) GetDeviceBcache(dev string) (*types.BcacheDeviceInfo, error)

GetDeviceBcache lsblk --pairs --noheadings --output KNAME,MAJ:MIN /dev/hdd/pvc-test-v1

func (*BcacheImplement) RegisterDevice

func (bi *BcacheImplement) RegisterDevice(dev ...string) error

func (*BcacheImplement) RemoveBcache

func (bi *BcacheImplement) RemoveBcache(bcacheInfo *types.BcacheDeviceInfo) error

func (*BcacheImplement) SetCacheMode

func (bi *BcacheImplement) SetCacheMode(bcache string, cachePolicy string) error

func (*BcacheImplement) ShowDevice

func (bi *BcacheImplement) ShowDevice(dev string) (*types.BcacheDeviceInfo, error)

Jump to

Keyboard shortcuts

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