localdisk

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	APIVersion          = "v1alpha1"
	LocalDiskKind       = "LocalDisk"
	LocalDiskAPIVersion = "localdiskmanager.hwameistor" + "/" + APIVersion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// Mgr k8s runtime controller
	Mgr crmanager.Manager

	// Namespace is the namespace in which ldm is installed
	NameSpace string

	// NodeName is the node in which ldm is installed
	NodeName string
}

Controller The smallest unit to be processed here should be the disk. The main thing to do is how to convert the local disk into resources in the cluster

func NewController

func NewController(mgr crmanager.Manager) Controller

NewController

func (Controller) ConvertDiskToLocalDisk

func (ctr Controller) ConvertDiskToLocalDisk(disk manager.DiskInfo) (ld ldm.LocalDisk)

ConvertDiskToLocalDisk

func (Controller) CreateLocalDisk

func (ctr Controller) CreateLocalDisk(ld ldm.LocalDisk) error

CreateLocalDisk

func (Controller) GenLocalDiskName

func (ctr Controller) GenLocalDiskName(disk manager.DiskInfo) string

func (Controller) GetLocalDisk

func (ctr Controller) GetLocalDisk(key client.ObjectKey) (ldm.LocalDisk, error)

GetLocalDisk

func (Controller) IsAlreadyExist

func (ctr Controller) IsAlreadyExist(ld ldm.LocalDisk) bool

IsAlreadyExist

func (Controller) UpdateLocalDisk

func (ctr Controller) UpdateLocalDisk(ld ldm.LocalDisk) error

CreateLocalDisk

Jump to

Keyboard shortcuts

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