attacher

package
v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package attacher provide operations of volume attach

Index

Constants

View Source
const (
	// AccessModeBalanced defines balanced mode of access
	AccessModeBalanced = "0"
)
View Source
const (
	// MultiPathTypeDefault defines default multi path type
	MultiPathTypeDefault = "0"
)

Variables

This section is empty.

Functions

func GetMultipleInitiators

func GetMultipleInitiators(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) ([]string, error)

GetMultipleInitiators use this method when the initiator is an array e.g. fc

func GetSingleInitiator

func GetSingleInitiator(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) (string, error)

GetSingleInitiator use this method when the initiator is single e.g. iscsi

Types

type Attacher

type Attacher struct {
	// contains filtered or unexported fields
}

Attacher defines attacher to attach volume

func (*Attacher) ControllerDetach

func (p *Attacher) ControllerDetach(ctx context.Context,
	lunName string,
	parameters map[string]interface{}) (string, error)

ControllerDetach detaches volume and unmaps lun from host

type AttacherPlugin

type AttacherPlugin interface {
	ControllerAttach(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
	ControllerDetach(context.Context, string, map[string]interface{}) (string, error)
	// contains filtered or unexported methods
}

AttacherPlugin defines interfaces of attach operations

func NewAttacher

func NewAttacher(
	product string,
	cli client.BaseClientInterface,
	protocol, invoker string,
	portals []string,
	alua map[string]interface{}) AttacherPlugin

NewAttacher init a new attacher

type DoradoV6Attacher

type DoradoV6Attacher struct {
	Attacher
}

DoradoV6Attacher implements interface AttacherPlugin

func (*DoradoV6Attacher) ControllerAttach

func (p *DoradoV6Attacher) ControllerAttach(ctx context.Context,
	lunName string,
	parameters map[string]interface{}) (map[string]interface{}, error)

ControllerAttach attaches volume and maps lun to host

type InitiatorType

type InitiatorType int

InitiatorType defines the initiator type

const (
	// ISCSI defines iscsi initiator type
	ISCSI InitiatorType = iota

	// FC defines fc initiator type
	FC

	// ROCE defines roce initiator type
	ROCE
)

type MetroAttacher

type MetroAttacher struct {
	// contains filtered or unexported fields
}

MetroAttacher implements interface AttacherPlugin

func NewMetroAttacher

func NewMetroAttacher(localAttacher, remoteAttacher AttacherPlugin, protocol string) *MetroAttacher

NewMetroAttacher inits a new metro attacher

func (*MetroAttacher) ControllerAttach

func (p *MetroAttacher) ControllerAttach(ctx context.Context,
	lunName string,
	parameters map[string]interface{}) (map[string]interface{}, error)

ControllerAttach attaches local and remote volume

func (*MetroAttacher) ControllerDetach

func (p *MetroAttacher) ControllerDetach(ctx context.Context,
	lunName string,
	parameters map[string]interface{}) (string, error)

ControllerDetach detaches local and remote volume

type OceanStorAttacher

type OceanStorAttacher struct {
	Attacher
}

OceanStorAttacher implements interface AttacherPlugin

func (*OceanStorAttacher) ControllerAttach

func (p *OceanStorAttacher) ControllerAttach(ctx context.Context,
	lunName string,
	parameters map[string]interface{}) (
	map[string]interface{}, error)

ControllerAttach attaches volume and maps lun to host

Jump to

Keyboard shortcuts

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