san

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FC    = "fc"
	FCOE  = "fcoe"
	ISCSI = "iscsi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Initiator

type Initiator struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

func GetFCInitiator

func GetFCInitiator(hostLink string) (Initiator, error)

func GetFCInitiators

func GetFCInitiators() ([]Initiator, error)

func GetISCSIInitiators

func GetISCSIInitiators() ([]Initiator, error)

func GetInitiators

func GetInitiators() ([]Initiator, error)

func (Initiator) DeepCopy

func (t Initiator) DeepCopy() Initiator

func (Initiator) IsEqual

func (t Initiator) IsEqual(other Initiator) bool

type Path

type Path struct {
	Initiator Initiator `json:"initiator"`
	Target    Target    `json:"target"`
}

Path is a hba:target link

func GetFCPaths

func GetFCPaths() ([]Path, error)

func (Path) DeepCopy

func (t Path) DeepCopy() Path

func (Path) IsEqual

func (t Path) IsEqual(other Path) bool

func (Path) IsIn

func (t Path) IsIn(paths Paths) bool

func (Path) String

func (t Path) String() string

type Paths

type Paths []Path

Paths is a list of hba:target

func GetISCSIPaths

func GetISCSIPaths() (Paths, error)

func GetPaths

func GetPaths() (Paths, error)

func ParseMapping

func ParseMapping(s string) (Paths, error)

func ParseMappings

func ParseMappings(l []string) (Paths, error)

ParseMappings reads the mappings of a command line, in the grammar the collector and the v2 agent write them: one initiator and the targets to reach it through, "<hba_id>:<tgt_id>[,<tgt_id>...]", the option repeated once per initiator.

ParseMapping reads a different grammar, where the comma separates whole pairs. A value written for the collector and read that way loses every target but the first, and takes the others for initiators with no target of their own.

func (Paths) DeepCopy

func (t Paths) DeepCopy() *Paths

func (Paths) Diff

func (t Paths) Diff(other Paths) string

func (Paths) Has

func (t Paths) Has(p Path) bool

func (Paths) HasAllOf

func (t Paths) HasAllOf(paths Paths) bool

func (Paths) HasAnyOf

func (t Paths) HasAnyOf(paths Paths) bool

func (Paths) Mapping

func (t Paths) Mapping() string

func (Paths) MappingList

func (t Paths) MappingList() []string

MappingList returns the paths in the mapping grammar the array commands read, "<hba_id>:<tgt_id>", one per path.

It is not the String of the paths, which names the target first: a pool handing that to an array had the array look its target up as an initiator, and present the disk to the host the target name happened to match, if any.

func (Paths) WithInitiatorName

func (t Paths) WithInitiatorName(name string) Paths

WithInitiatorName returns the list of paths whose initiator name matches the argument.

func (Paths) WithTargetName

func (t Paths) WithTargetName(name string) Paths

WithTargetName returns the list of paths whose target name matches the argument.

type Target

type Target struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

func (Target) DeepCopy

func (t Target) DeepCopy() Target

func (Target) IsEqual

func (t Target) IsEqual(other Target) bool

type Targets

type Targets []Target

Jump to

Keyboard shortcuts

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