fibrechannel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(c Connector, io ioHandler) (string, error)

Attach attempts to attach a fc volume to a node using the provided Connector info

func Detach

func Detach(devicePath string, io ioHandler) error

Detach performs a detach operation on a volume

func FindMultipathDeviceForDevice

func FindMultipathDeviceForDevice(device string, io ioHandler) (string, error)

FindMultipathDeviceForDevice given a device name like /dev/sdx, find the devicemapper parent

func FindSlaveDevicesOnMultipath

func FindSlaveDevicesOnMultipath(dm string, io ioHandler) []string

FindSlaveDevicesOnMultipath returns all slaves on the multipath device given the device path

func RemoveMultipathDevice

func RemoveMultipathDevice(device string) error

Types

type Connector

type Connector struct {
	VolumeName string
	TargetWWNs []string
	Lun        string
	WWIDs      []string
}

Connector provides a struct to hold all of the needed parameters to make our Fibre Channel connection

type OSioHandler

type OSioHandler struct{}

OSioHandler is a wrapper that includes all the necessary io functions used for (Should be used as default io handler)

func (handler *OSioHandler) EvalSymlinks(path string) (string, error)

EvalSymlinks calls EvalSymlinks from filepath package

func (*OSioHandler) Lstat

func (handler *OSioHandler) Lstat(name string) (os.FileInfo, error)

Lstat calls the Lstat function from os package

func (*OSioHandler) ReadDir

func (handler *OSioHandler) ReadDir(dirname string) ([]os.FileInfo, error)

ReadDir calls the ReadDir function from ioutil package

func (*OSioHandler) WriteFile

func (handler *OSioHandler) WriteFile(filename string, data []byte, perm os.FileMode) error

WriteFile calls WriteFile from ioutil package

Jump to

Keyboard shortcuts

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