Documentation ¶
Overview ¶
Package nbd uses the Linux NBD layer to emulate a block device in user space
Index ¶
Constants ¶
View Source
const (
// Defined in <linux/fs.h>:
BLKROSET = 4701
)
Variables ¶
This section is empty.
Functions ¶
func FindDevice ¶
Types ¶
type Device ¶
type Device interface { ReadAt(b []byte, off int64) (n int, err error) WriteAt(b []byte, off int64) (n int, err error) Sync() error Trim(off, len int64) error Size() uint64 Close() error }
Device interface is a subset of os.File.
type DeviceFinder ¶
type NBD ¶
type NBD struct {
// contains filtered or unexported fields
}
NBD implements nbd device operations.
func (*NBD) Disconnect ¶
func (nbd *NBD) Disconnect()
func (*NBD) SetBlockSize ¶
Click to show internal directories.
Click to hide internal directories.