device

package
v3.0.0-beta15 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 19 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 (
	ModeBlock uint = syscall.S_IFBLK
	ModeChar  uint = syscall.S_IFCHR
)

Variables

This section is empty.

Functions

func RemoveHolders

func RemoveHolders(ctx context.Context, head T) error

func WithLogger

func WithLogger(log *plog.Logger) funcopt.O

Types

type L

type L []T

func (L) Contains

func (t L) Contains(dev T) (bool, error)

func (L) HolderEndpoints

func (t L) HolderEndpoints() (L, error)

func (L) SCSIPaths

func (t L) SCSIPaths() (L, error)

type T

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

func New

func New(path string, opts ...funcopt.O) T

func (T) ConfigureMultipath

func (t T) ConfigureMultipath(ctx context.Context, verbosity int) error

func (T) Delete

func (t T) Delete() error

func (T) Driver

func (t T) Driver() (interface{}, error)

func (T) Holders

func (t T) Holders() (L, error)

func (T) Host

func (t T) Host() (string, error)

func (T) IsMultipath

func (t T) IsMultipath() (bool, error)

func (T) IsReadOnly

func (t T) IsReadOnly() (bool, error)

func (T) IsReadWrite

func (t T) IsReadWrite() (bool, error)

func (T) IsReady

func (t T) IsReady(ctx context.Context) (bool, error)

func (T) IsReservable

func (t T) IsReservable() (bool, error)

func (T) IsSCSI

func (t T) IsSCSI() (bool, error)

func (T) Major

func (t T) Major() (uint32, error)

func (T) MajorMinor

func (t T) MajorMinor() (uint32, uint32, error)

func (T) MajorMinorStr

func (t T) MajorMinorStr() (string, error)

func (T) MarshalJSON

func (t T) MarshalJSON() ([]byte, error)

MarshalJSON marshals the data as a quoted json string

func (T) Minor

func (t T) Minor() (uint32, error)

func (T) MknodBlock

func (t T) MknodBlock(major, minor uint32) error

func (T) Model

func (t T) Model() (string, error)

func (T) Path

func (t T) Path() string

func (T) PromoteRW

func (t T) PromoteRW(ctx context.Context) error

func (T) RefreshMultipath

func (t T) RefreshMultipath(ctx context.Context) error

func (T) Remove

func (t T) Remove(ctx context.Context) error

func (T) RemoveHolders

func (t T) RemoveHolders(ctx context.Context) error

func (T) RemoveMultipath

func (t T) RemoveMultipath(ctx context.Context) error

func (T) Rescan

func (t T) Rescan() error

func (T) SCSIPaths

func (t T) SCSIPaths() (L, error)

func (T) SetReadOnly

func (t T) SetReadOnly(ctx context.Context) error

func (T) SetReadWrite

func (t T) SetReadWrite(ctx context.Context) error

func (T) SlaveHosts

func (t T) SlaveHosts() ([]string, error)

func (T) Slaves

func (t T) Slaves() (L, error)

func (T) Stat

func (t T) Stat() (unix.Stat_t, error)

func (T) String

func (t T) String() string

func (*T) UnmarshalJSON

func (t *T) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to value

func (T) Vendor

func (t T) Vendor() (string, error)

func (T) Version

func (t T) Version() (string, error)

func (T) WWID

func (t T) WWID() (string, error)

func (T) WaitReady

func (t T) WaitReady(ctx context.Context) error

func (T) Wipe

func (t T) Wipe(ctx context.Context) error

Jump to

Keyboard shortcuts

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