array

package
v0.0.0-...-dea5896 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipArgs

func SkipArgs() []string

Types

type Array

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

func New

func New() *Array

func (Array) Config

func (t Array) Config() *xconfig.T

func (Array) Key

func (t Array) Key(s string) key.T

func (Array) Name

func (t Array) Name() string

func (*Array) SetConfig

func (t *Array) SetConfig(c *xconfig.T)

func (*Array) SetName

func (t *Array) SetName(s string)

type Disk

type Disk struct {
	DiskID     string   `json:"disk_id"`
	DevID      string   `json:"dev_id"`
	Mappings   Mappings `json:"mappings"`
	DriverData any      `json:"driver_data"`
}

type Driver

type Driver interface {
	Name() string
	SetName(string)
	SetConfig(*xconfig.T)
	Config() *xconfig.T
	Run([]string) error
}

func GetDriver

func GetDriver(s string) Driver

type Mapping

type Mapping struct {
	HBAID string `json:"hba_id"`
	TGTID string `json:"tgt_id"`
	LUN   string `json:"lun"`
}

type Mappings

type Mappings map[string]Mapping

Mappings is a map of Mapping indexed by "<hbaId>:<tgtId>"

func ParseMappings

func ParseMappings(mappings []string) (Mappings, error)

func (Mappings) Add

func (m Mappings) Add(hbaId, tgtId string) Mappings

func (Mappings) Parse

func (m Mappings) Parse(s string) (Mappings, error)

func (*Mappings) Set

func (c *Mappings) Set(value string) error

func (*Mappings) String

func (c *Mappings) String() string

func (*Mappings) Type

func (c *Mappings) Type() string

Jump to

Keyboard shortcuts

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