iscsi

package module
v0.0.0-...-b54b043 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 16 Imported by: 0

README

Ideas

  • Completely fill a volume with random data
  • write marker values to each lba of a volume
  • io.Reader/io.Writer backed by iscsi
    • how does the block limit affect this? write would have to write a partially empty block and be able to keep track of where to resume writing.

TODO

  • build a binary cross-platform for linux

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(details ConnectionDetails) *device

Creates a new ISCSI device with the given connection details Note that an ISCSI device is not safe to use from multiple goroutines

func Reader

func Reader(dev *device) (*reader, error)

func SetLogger

func SetLogger(l *slog.Logger)

Types

type Capacity

type Capacity struct {
	// the maximum addressable block in the device
	MaxLBA    int
	BlockSize int
}

type ConnectionDetails

type ConnectionDetails struct {
	InitiatorIQN string
	TargetURL    string
}

type Read16

type Read16 struct {
	LBA       int
	Blocks    int
	BlockSize int
}

type Task

type Task struct {
	Status int
	DataIn []byte
}

Don't want to expose C structs to callers and can't embed C structs in a Go struct so we need getters

type TaskResult

type TaskResult struct {
	Task    Task
	Err     error
	Context any
}

type Write16

type Write16 struct {
	LBA       int
	Data      []byte
	BlockSize int
}

Directories

Path Synopsis
cmd
drivefiller command
example command

Jump to

Keyboard shortcuts

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