Documentation ¶
Overview ¶
Package mapper uses libcryptsetup to format and map crypt devices.
This is used by the disk-mapper to set up a node's state disk.
All interaction with libcryptsetup should be done here.
Warning: This package is not thread safe, since libcryptsetup is not thread safe.
Index ¶
- type Mapper
- func (m *Mapper) Close() error
- func (m *Mapper) DiskUUID() string
- func (m *Mapper) FormatDisk(passphrase string) error
- func (m *Mapper) IsLUKSDevice() bool
- func (m *Mapper) MapDisk(target, passphrase string) error
- func (m *Mapper) UnmapDisk(target string) error
- func (m *Mapper) Wipe(blockWipeSize int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper handles actions for formatting and mapping crypt devices.
func (*Mapper) FormatDisk ¶
FormatDisk formats the disk and adds passphrase in keyslot 0.
func (*Mapper) IsLUKSDevice ¶
IsLUKSDevice returns true if the device is formatted as a LUKS device.
func (*Mapper) MapDisk ¶
MapDisk maps a crypt device to /dev/mapper/target using the provided passphrase.
Click to show internal directories.
Click to hide internal directories.