Documentation
¶
Index ¶
- Constants
- func SetLogger(customLogger Logger)
- func SetTracer(customTracer Tracer)
- type Device
- type DevicePathResult
- type FCConnector
- func (fc *FCConnector) ConnectVolume(ctx context.Context, info FCVolumeInfo) (Device, error)
- func (fc *FCConnector) DisconnectVolume(ctx context.Context, info FCVolumeInfo) error
- func (fc *FCConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
- func (fc *FCConnector) GetInitiatorPorts(ctx context.Context) ([]string, error)
- type FCConnectorParams
- type FCHBA
- type FCTargetInfo
- type FCVolumeInfo
- type ISCSIConnector
- func (c *ISCSIConnector) ConnectVolume(ctx context.Context, info ISCSIVolumeInfo) (Device, error)
- func (c *ISCSIConnector) DisconnectVolume(ctx context.Context, info ISCSIVolumeInfo) error
- func (c *ISCSIConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
- func (c *ISCSIConnector) GetInitiatorName(ctx context.Context) ([]string, error)
- type ISCSIConnectorParams
- type ISCSITargetInfo
- type ISCSIVolumeInfo
- type Logger
- type NVMeTCPConnector
- func (c *NVMeTCPConnector) ConnectVolume(ctx context.Context, info NVMeTCPVolumeInfo) (Device, error)
- func (c *NVMeTCPConnector) DisconnectVolume(ctx context.Context, info NVMeTCPVolumeInfo) error
- func (c *NVMeTCPConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
- func (c *NVMeTCPConnector) GetInitiatorName(ctx context.Context) ([]string, error)
- type NVMeTCPConnectorParams
- type NVMeTCPTargetInfo
- type NVMeTCPVolumeInfo
- type Tracer
Constants ¶
const ( // NVMeWaitDeviceTimeoutDefault - NVMe default device time out NVMeWaitDeviceTimeoutDefault = time.Second * 30 // NVMeWaitDeviceRegisterTimeoutDefault - NVMe default device register timeout NVMeWaitDeviceRegisterTimeoutDefault = time.Second * 10 // NVMeMaxParallelOperationsDefault - max parallen NVMe operations NVMeMaxParallelOperationsDefault = 5 // NVMePortDefault - NVMe TCP port NVMePortDefault = ":4420" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DevicePathResult ¶ added in v1.3.0
type DevicePathResult struct {
// contains filtered or unexported fields
}
DevicePathResult - placeholder for nvme devicepaths
type FCConnector ¶
type FCConnector struct {
// contains filtered or unexported fields
}
FCConnector connector for FC transport
func NewFCConnector ¶
func NewFCConnector(params FCConnectorParams) *FCConnector
NewFCConnector create new FCConnector
func (*FCConnector) ConnectVolume ¶
func (fc *FCConnector) ConnectVolume(ctx context.Context, info FCVolumeInfo) (Device, error)
ConnectVolume attach volume to a node
func (*FCConnector) DisconnectVolume ¶
func (fc *FCConnector) DisconnectVolume(ctx context.Context, info FCVolumeInfo) error
DisconnectVolume disconnects volume from a node by full volume request
func (*FCConnector) DisconnectVolumeByDeviceName ¶
func (fc *FCConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
DisconnectVolumeByDeviceName disconnects volume from a node by device name
func (*FCConnector) GetInitiatorPorts ¶
func (fc *FCConnector) GetInitiatorPorts(ctx context.Context) ([]string, error)
GetInitiatorPorts return information about nodes local FC ports
type FCConnectorParams ¶
type FCConnectorParams struct {
// run commands inside chroot
Chroot string
// how long wait for DM appear
WaitDeviceRegisterTimeout time.Duration
// timeout for multipath flush command
MultipathFlushTimeout time.Duration
// timeout for each multipath flush retry
MultipathFlushRetryTimeout time.Duration
// how many retries for multipath flush
MultipathFlushRetries int
// how many parallel operations allowed
MaxParallelOperations int
}
FCConnectorParams options for FCConnector
type FCTargetInfo ¶
type FCTargetInfo struct {
WWPN string
}
FCTargetInfo holds information about remote FC ports
type FCVolumeInfo ¶
type FCVolumeInfo struct {
Targets []FCTargetInfo
Lun int
}
FCVolumeInfo connection request for volume
type ISCSIConnector ¶
type ISCSIConnector struct {
// contains filtered or unexported fields
}
ISCSIConnector defines iscsi connector info
func NewISCSIConnector ¶
func NewISCSIConnector(params ISCSIConnectorParams) *ISCSIConnector
NewISCSIConnector creates an ISCSI client and returns it
func (*ISCSIConnector) ConnectVolume ¶
func (c *ISCSIConnector) ConnectVolume(ctx context.Context, info ISCSIVolumeInfo) (Device, error)
ConnectVolume connects to the iscsi volume and returns device info
func (*ISCSIConnector) DisconnectVolume ¶
func (c *ISCSIConnector) DisconnectVolume(ctx context.Context, info ISCSIVolumeInfo) error
DisconnectVolume disconnects from iscsi volume
func (*ISCSIConnector) DisconnectVolumeByDeviceName ¶
func (c *ISCSIConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
DisconnectVolumeByDeviceName disconnects from volume specified by WWN name
func (*ISCSIConnector) GetInitiatorName ¶
func (c *ISCSIConnector) GetInitiatorName(ctx context.Context) ([]string, error)
GetInitiatorName gets iscsi initiators and returns it
type ISCSIConnectorParams ¶
type ISCSIConnectorParams struct {
// iscsiLib command will run from this chroot
Chroot string
// chap
ChapUser string
ChapPassword string
ChapEnabled bool
// timeouts
// how long to wait for iSCSI session to become active after login
WaitDeviceTimeout time.Duration
WaitDeviceRegisterTimeout time.Duration
FailedSessionMinimumLoginRetryInterval time.Duration
MultipathFlushTimeout time.Duration
MultipathFlushRetryTimeout time.Duration
MultipathFlushRetries int
MaxParallelOperations int
}
ISCSIConnectorParams defines ISCSI connector parameters
type ISCSITargetInfo ¶
ISCSITargetInfo defines iscsi target info
type ISCSIVolumeInfo ¶
type ISCSIVolumeInfo struct {
Targets []ISCSITargetInfo
Lun int
}
ISCSIVolumeInfo defines iscsi volume info
type NVMeTCPConnector ¶ added in v1.3.0
type NVMeTCPConnector struct {
// contains filtered or unexported fields
}
NVMeTCPConnector - type defenition for NVMe connector
func NewNVMeTCPConnector ¶ added in v1.3.0
func NewNVMeTCPConnector(params NVMeTCPConnectorParams) *NVMeTCPConnector
NewNVMeTCPConnector - get new NVMeTCPConnector
func (*NVMeTCPConnector) ConnectVolume ¶ added in v1.3.0
func (c *NVMeTCPConnector) ConnectVolume(ctx context.Context, info NVMeTCPVolumeInfo) (Device, error)
ConnectVolume - connect to nvme volume
func (*NVMeTCPConnector) DisconnectVolume ¶ added in v1.3.0
func (c *NVMeTCPConnector) DisconnectVolume(ctx context.Context, info NVMeTCPVolumeInfo) error
DisconnectVolume - disconnect a given nvme volume
func (*NVMeTCPConnector) DisconnectVolumeByDeviceName ¶ added in v1.3.0
func (c *NVMeTCPConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
DisconnectVolumeByDeviceName - disconnect from a given device
func (*NVMeTCPConnector) GetInitiatorName ¶ added in v1.3.0
func (c *NVMeTCPConnector) GetInitiatorName(ctx context.Context) ([]string, error)
GetInitiatorName - returns nqn
type NVMeTCPConnectorParams ¶ added in v1.3.0
type NVMeTCPConnectorParams struct {
// nvmeLib command will run from this chroot
Chroot string
// timeouts
// how long to wait for nvme session to become active after login
WaitDeviceTimeout time.Duration
WaitDeviceRegisterTimeout time.Duration
FailedSessionMinimumLoginRetryInterval time.Duration
MultipathFlushTimeout time.Duration
MultipathFlushRetryTimeout time.Duration
MultipathFlushRetries int
MaxParallelOperations int
}
NVMeTCPConnectorParams - type definition for NVMe TCP connector params
type NVMeTCPTargetInfo ¶ added in v1.3.0
NVMeTCPTargetInfo - Placeholder for NVMe targets
type NVMeTCPVolumeInfo ¶ added in v1.3.0
type NVMeTCPVolumeInfo struct {
Targets []NVMeTCPTargetInfo
WWN string
}
NVMeTCPVolumeInfo - placeholder for NVMe TCP volume
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
multipath
Package multipath is a generated GoMock package.
|
Package multipath is a generated GoMock package. |
|
scsi
Package scsi is a generated GoMock package.
|
Package scsi is a generated GoMock package. |
|
wrappers
Package wrappers is a generated GoMock package.
|
Package wrappers is a generated GoMock package. |
|
pkg
|
|