nvmeof

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(connMap map[string]interface{}) (string, error)

Connect NVMe-OF Target ,return the new target device path in this node

func DisConnect

func DisConnect(nqn string) error

DisConnect nvme device by name

func Discovery

func Discovery(connMap map[string]interface{}) error

Discovery NVMe-OF target

func GetInitiator

func GetInitiator() ([]string, error)

GetInitiator returns all the Nvmeof UUID

func GetNvmeDevice

func GetNvmeDevice() (map[string]int, error)

GetNvmeDevice get all the nvme devices

func GetNvmeSubsystems

func GetNvmeSubsystems() (map[string]int, error)

GetNvmeSubsystems :list connected target name

Types

type ConnectorInfo

type ConnectorInfo struct {
	Nqn       string `mapstructure:"targetNQN"`    //NVMe subsystem name to the volume to be connected
	TgtPort   string `mapstructure:"targetPort"`   //NVMe target port that hosts the nqn sybsystem
	TgtPortal string `mapstructure:"targetIP"`     //NVMe target ip that hosts the nqn sybsystem
	TranType  string `mapstructure:"transporType"` // Nvme transport type
	HostNqn   string `mapstructure:"hostNqn"`      // host nqn
}

ConnectorInfo define

func ParseNvmeofConnectInfo

func ParseNvmeofConnectInfo(connectInfo map[string]interface{}) *ConnectorInfo

ParseNvmeofConnectInfo decode

type Nvmeof

type Nvmeof struct{}

func (*Nvmeof) Attach

func (nof *Nvmeof) Attach(conn map[string]interface{}) (string, error)

func (*Nvmeof) Detach

func (nof *Nvmeof) Detach(conn map[string]interface{}) error

func (*Nvmeof) GetInitiatorInfo

func (nof *Nvmeof) GetInitiatorInfo() (string, error)

GetInitiatorInfo implementation

Jump to

Keyboard shortcuts

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