Documentation ¶
Overview ¶
Package gobrick is a generated GoMock package.
Index ¶
- Constants
- func SetLogger(customLogger Logger)
- func SetTracer(customTracer Tracer)
- type Device
- type DevicePathResult
- type FCConnector
- func (fc *FCConnector) ConnectRDMVolume(ctx context.Context, info RDMVolumeInfo) (Device, error)
- 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 FCHBAInfo
- 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 NVMeConnector
- func (c *NVMeConnector) ConnectVolume(ctx context.Context, info NVMeVolumeInfo, useFC bool) (Device, error)
- func (c *NVMeConnector) DisconnectVolume(ctx context.Context, info NVMeVolumeInfo) error
- func (c *NVMeConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
- func (c *NVMeConnector) GetInitiatorName(ctx context.Context) ([]string, error)
- type NVMeConnectorParams
- type NVMeTargetInfo
- type NVMeVolumeInfo
- type RDMVolumeInfo
- 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 ¶
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) ConnectRDMVolume ¶
func (fc *FCConnector) ConnectRDMVolume(ctx context.Context, info RDMVolumeInfo) (Device, error)
ConnectRDMVolume attach RDM to a VM
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 NVMeConnector ¶
type NVMeConnector struct {
// contains filtered or unexported fields
}
NVMeConnector - type defenition for NVMe connector
func NewNVMeConnector ¶
func NewNVMeConnector(params NVMeConnectorParams) *NVMeConnector
NewNVMeConnector - get new NVMeConnector
func (*NVMeConnector) ConnectVolume ¶
func (c *NVMeConnector) ConnectVolume(ctx context.Context, info NVMeVolumeInfo, useFC bool) (Device, error)
ConnectVolume - connect to nvme volume
func (*NVMeConnector) DisconnectVolume ¶
func (c *NVMeConnector) DisconnectVolume(ctx context.Context, info NVMeVolumeInfo) error
DisconnectVolume - disconnect a given nvme volume
func (*NVMeConnector) DisconnectVolumeByDeviceName ¶
func (c *NVMeConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error
DisconnectVolumeByDeviceName - disconnect from a given device
func (*NVMeConnector) GetInitiatorName ¶
func (c *NVMeConnector) GetInitiatorName(ctx context.Context) ([]string, error)
GetInitiatorName - returns nqn
type NVMeConnectorParams ¶
type NVMeConnectorParams 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 }
NVMeConnectorParams - type definition for NVMe connector params
type NVMeTargetInfo ¶
NVMeTargetInfo - Placeholder for NVMe targets
type NVMeVolumeInfo ¶
type NVMeVolumeInfo struct { Targets []NVMeTargetInfo WWN string }
NVMeVolumeInfo - placeholder for NVMe volume
type RDMVolumeInfo ¶
type RDMVolumeInfo struct { Targets []FCTargetInfo Lun int WWN string }
RDMVolumeInfo has request info for RDM device
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
logger
Package logger is a generated GoMock package.
|
Package logger is a generated GoMock package. |
mockhelper
Package mockhelper is a generated GoMock package.
|
Package mockhelper is a generated GoMock package. |
multipath
Package multipath is a generated GoMock package.
|
Package multipath is a generated GoMock package. |
powerpath
Package powerpath is a generated GoMock package.
|
Package powerpath is a generated GoMock package. |
scsi
Package scsi is a generated GoMock package.
|
Package scsi is a generated GoMock package. |
tracer
Package tracer is a generated GoMock package.
|
Package tracer is a generated GoMock package. |
wrappers
Package wrappers is a generated GoMock package.
|
Package wrappers is a generated GoMock package. |
pkg
|
|