targets

package
v0.0.0-...-295c363 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NvmetDir = "/sys/kernel/config/nvmet"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ISCSITarget

type ISCSITarget interface {
	CreateISCSITarget(volId, tgtIqn, path, hostIp, initiator string, chapAuth []string) error
	GetISCSITarget(iqn string) int
	RemoveISCSITarget(volId, iqn string) error
	GetLun(path string) int
}

func NewISCSITarget

func NewISCSITarget(bip, tgtConfDir string) ISCSITarget

type NvmeofTarget

type NvmeofTarget interface {
	CreateNvmeofTarget(volId, tgtIqn, path, hostIp, initiator string, chapAuth []string) error
	GetNvmeofTarget(iqn string) int
	RemoveNvmeofTarget(volId, iqn string) error
}

func NewNvmeofTarget

func NewNvmeofTarget(bip, tgtConfDir string) NvmeofTarget

type NvmeoftgtTarget

type NvmeoftgtTarget struct {
	BindIp     string
	TgtConfDir string
}

func (*NvmeoftgtTarget) CreateNvmeofTarget

func (t *NvmeoftgtTarget) CreateNvmeofTarget(volId, tgtNqn, path, hostIp, initiator string, chapAuth []string) error

func (*NvmeoftgtTarget) GetNvmeofTarget

func (t *NvmeoftgtTarget) GetNvmeofTarget(nqn string) int

func (*NvmeoftgtTarget) Getnamespaceid

func (t *NvmeoftgtTarget) Getnamespaceid(volId string) string

func (*NvmeoftgtTarget) RemoveNvmeofTarget

func (t *NvmeoftgtTarget) RemoveNvmeofTarget(volId, nqn string) error

func (*NvmeoftgtTarget) WriteWithIo

func (*NvmeoftgtTarget) WriteWithIo(name, content string) error

type Target

type Target interface {
	CreateExport(volId, path, hostIp, initiator string, chapAuth []string) (map[string]interface{}, error)

	RemoveExport(volId string) error
}

Target is an interface for exposing some operations of different targets, currently support iscsiTarget.

func NewTarget

func NewTarget(bip string, tgtConfDir string, access string) Target

NewTarget method creates a new target based on its type.

Jump to

Keyboard shortcuts

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