Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultSize = 1 * datasize.MB
)
defaults that are used for any zero value in Options
View Source
const Version = "0.2.1"
Version is the semantic version of this package.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LinuxPlatformImplementation ¶
type LinuxPlatformImplementation struct{}
LinuxPlatformImplementation is the implementation for Linux systems.
The Linux implementation likely *requires sudo* to function on most distros. If you want a sudo-less option, you can use /dev/shm instead on most modern Linux platforms.
type Options ¶
type Options struct {
MountPath string // optional: fs mount dir (default: temp directory)
Size uint64 // optional: size in bytes (default: DefaultSize)
Logger *log.Logger // optional: logger for verbose implementation logs
}
Options are optional values that will override default behavior
type PlatformImplementation ¶
type PlatformImplementation interface {
// contains filtered or unexported methods
}
PlatformImplementation is the interface that should be implmented on an individual platform (operating system, etc), and hidden behind platform specific build tags.
type RAMDisk ¶
type RAMDisk struct {
// The system path referring to the RAMDisk. This may or may not be
// identical to the MountPath, depending on operating system specific
// implementations.
DevicePath string
// The filesystem path where the RAMDisk is mounted and may be viewed.
MountPath string
}
RAMDisk represents the "results" of a ram disk creation operation
Click to show internal directories.
Click to hide internal directories.