mem

package
v1.1.3-dev Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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 GetMetaData

func GetMetaData(resource string) string

GetMetaData get host regionid, zoneid

func GetPvNameFormMntPoint

func GetPvNameFormMntPoint(mntPath string) string

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

func NewDriver

func NewDriver(nodeID, endpoint, baseDir string) *MEM

NewDriver create the identity/node/controller server and disk driver

func (*MEM) Run

func (mem *MEM) Run()

Run start a new server

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 ...

func GetRegions added in v1.1.1

func GetRegions() (*PmemRegions, error)

GetRegions ...

Jump to

Keyboard shortcuts

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