Documentation ¶
Index ¶
- Constants
- func GetMetaData(resource string) string
- func GetPvNameFormMntPoint(mntPath string) string
- func GlobalConfigSet(region, nodeID, driverName, baseDir string)
- func NewNodeServer(d *csicommon.CSIDriver, nodeID string) csi.NodeServer
- type DaxctrlMem
- type GlobalConfig
- type MEM
- type PmemNameSpace
- type PmemRegion
- type PmemRegions
Constants ¶
View Source
const ( // NsenterCmd is the nsenter command NsenterCmd = "/nsenter --mount=/proc/1/ns/mnt" // NodeAffinity is the pv node schedule tag NodeAffinity = "nodeAffinity" // LocalDisk local disk LocalDisk = "localdisk" // DefaultFs default fs DefaultFs = "ext4" // MemoryType ... MemoryType = "memoryType" )
View Source
const ( // MemDriverName tag MemDriverName = "mem.csi.alibabacloud.com" // KmemNodeLabel ... KmemNodeLabel = "pmem.csi.alibabacloud.com/type" // KmemValue ... KmemValue = "KMEM" )
View Source
const ( // MetadataURL is metadata server url MetadataURL = "http://100.100.100.200/latest/meta-data/" // InstanceID is the instance id tag InstanceID = "instance-id" )
Variables ¶
This section is empty.
Functions ¶
func GetPvNameFormMntPoint ¶
GetPvNameFormMntPoint get pv name
func GlobalConfigSet ¶ added in v1.1.1
func GlobalConfigSet(region, nodeID, driverName, baseDir string)
GlobalConfigSet set Global Config
func NewNodeServer ¶
func NewNodeServer(d *csicommon.CSIDriver, nodeID string) csi.NodeServer
NewNodeServer create a NodeServer object
Types ¶
type DaxctrlMem ¶ added in v1.1.1
type DaxctrlMem struct { Chardev string `json:"chardev"` Size int64 `json:"size"` TargetNode int `json:"target_node"` Mode string `json:"mode"` Movable bool `json:"movable"` }
DaxctrlMem list all mems
type GlobalConfig ¶ added in v1.1.1
type GlobalConfig struct { Region string NodeID string Scheduler string BaseDir string KmemEnable bool ControllerProvision bool KubeClient *kubernetes.Clientset }
GlobalConfig var
var ( // GlobalConfigVar var GlobalConfigVar GlobalConfig )
type MEM ¶
type MEM struct {
// contains filtered or unexported fields
}
MEM the LVM struct
type PmemNameSpace ¶ added in v1.1.1
type PmemNameSpace struct { Dev string `json:"dev,omitempty"` Mode string `json:"mode,omitempty"` MapType string `json:"map,omitempty"` Size int64 `json:"size,omitempty"` UUID string `json:"uuid,omitempty"` SectorSize int64 `json:"sectorsize,omitempty"` Align int64 `json:"align,omitempty"` BlockDev string `json:"blockdev,omitempty"` CharDev string `json:"chardev,omitempty"` Name string `json:"name,omitempty"` }
PmemNameSpace define one pmem namespaces
type PmemRegion ¶ added in v1.1.1
type PmemRegion struct { Dev string `json:"dev"` Size int64 `json:"size,omitempty"` AvailableSize int64 `json:"available_size,omitempty"` MaxAvailableExent int64 `json:"max_available_extent,omitempty"` RegionType string `json:"type,omitempty"` IsetID int64 `json:"iset_id,omitempty"` PersistenceDomain string `json:"persistence_domain,omitempty"` Namespaces []PmemNameSpace `json:"namespaces,omitempty"` }
PmemRegion define on pmem region
type PmemRegions ¶ added in v1.1.1
type PmemRegions struct {
Regions []PmemRegion `json:"regions"`
}
PmemRegions ...
Click to show internal directories.
Click to hide internal directories.