init csi-driver-nvmf

Signed-off-by: zhouenhua <zhouenhua@bytedance.com>
This commit is contained in:
zhouenhua
2021-09-10 11:50:07 +08:00
commit 6a6ac61e01
31 changed files with 2544 additions and 0 deletions

31
pkg/nvmf/const.go Normal file
View File

@@ -0,0 +1,31 @@
package nvmf
const (
NVMF_NQN_SIZE = 223
SYS_NVMF = "/sys/class/nvmf"
)
// Here erron
const (
ENOENT = 1 /* No such file or directory */
EINVAL = 2 /* Invalid argument */
)
const (
DefaultDriverName = "csi.nvmf.com"
DefaultDriverServicePort = "12230"
DefaultDriverVersion = "v1.0.0"
DefaultVolumeMapPath = "/var/lib/nvmf/volumes"
)
type GlobalConfig struct {
NVMfVolumeMapDir string
DriverName string
Region string
NodeID string
Endpoint string // CSI endpoint
Version string
IsControllerServer bool
LogLevel string
}