connector

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FcDriver = config.FCProtocol
	PortName = "port_name"
	NodeName = "node_name"
	Wwpn     = "wwpn"
	Wwnn     = "wwnn"

	IscsiDriver = config.ISCSIProtocol
	Iqn         = "iqn"

	RbdDriver = config.RBDProtocol

	NvmeofDriver = config.NVMEOFProtocol
	Nqn          = "nqn"
	NFSDriver    = config.NFSProtocol
)

Variables

This section is empty.

Functions

func ExecCmd added in v0.3.3

func ExecCmd(name string, arg ...string) (string, error)

ExecCmd Log and convert the result of exec.Command

func Format added in v0.3.3

func Format(device string, fsType string) error

Format device by File System Type

func GetFSType added in v0.3.3

func GetFSType(device string) (string, error)

GetFSType returns the File System Type of device

func GetHostIP added in v0.5.1

func GetHostIP() string

GetHostIP return Host IP

func GetHostName added in v0.3.3

func GetHostName() (string, error)

GetHostName ...

func IsMounted added in v0.5.1

func IsMounted(target string) (bool, error)

IsMounted ...

func Mount added in v0.3.3

func Mount(device, mountpoint, fsType string, mountFlags []string) error

Mount device into mount point

func RegisterConnector

func RegisterConnector(cType string, cnt Connector) error

RegisterConnector implementation

func Umount added in v0.3.3

func Umount(mountpoint string) error

Umount from mountpoint

func UnregisterConnector

func UnregisterConnector(cType string)

UnregisterConnector implementation

Types

type Connector

type Connector interface {
	Attach(map[string]interface{}) (string, error)
	Detach(map[string]interface{}) error
	GetInitiatorInfo() ([]string, error)
}

Connector implementation

func NewConnector

func NewConnector(cType string) Connector

NewConnector implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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