Documentation
¶
Index ¶
Constants ¶
const ( // StatusTransfering denotes that the volume is currently being transfered by the // media changer. StatusTransfering uint32 = 1 << iota // StatusMounted is when the volume is mounted. StatusMounted // StatusNeedsCleaning tells us that the volume needs cleaning. StatusNeedsCleaning // StatusFormatted is set when the volume has already been formatted StatusFormatted )
Variables ¶
var SlotCategories = []SlotCategory{TransferSlot, StorageSlot, ImportExportSlot}
SlotCategories is a list of all valid slot types.
Functions ¶
func FormatVolumeFlags ¶
FormatVolumeFlags formats the flags for human consumption.
Types ¶
type ChangerConfig ¶
ChangerConfig holds the configuration for a changer.
type Config ¶
type Config struct { // The storage format ("ltfs", "bltfs", "raw") Format struct { Driver string Options map[string]string } // CleaningPrefix is the prefix that identifies cleaning cartridges. CleaningPrefix string `yaml:"cleaning-prefix"` // Inventory is the inventory database configuration. Inventory struct { Driver string Options map[string]string } // Changers contains configuration for the media changers. Changers map[string]ChangerConfig // Drives contains configuration for the drives. Drives struct { Format FormatConfig Read map[string]DriveConfig Write map[string]DriveConfig } }
Config is the tape config.
type DriveConfig ¶
DriveConfig holds configuration for drives.
type FormatConfig ¶
type Location ¶
type Location struct { Addr Addr Category SlotCategory }
Location uniquely identifies a location within a store.
type Slot ¶
type Slot struct { Location // Volume returns the volume currently in this slot (if any). Volume *Volume }
Slot is a slot in a store, represented by its element address.
type SlotCategory ¶
type SlotCategory int
SlotCategory is the type of slot (unknown, invalid, data transfer, storage or import/export).
const ( // UnknownSlot represents slots which purpose is unknown. UnknownSlot SlotCategory = iota // InvalidSlot represents slots that are invalidly addressed. InvalidSlot // TransferSlot represents data transfer slots, usually inhabited // by a tape drive. TransferSlot // StorageSlot represents storage slots. StorageSlot // ImportExportSlot represents so-called mailbox slots for bulk import/export // of volumes to and from the silo. ImportExportSlot )
func ToSlotCategory ¶
func ToSlotCategory(str string) SlotCategory
ToSlotCategory returns the SlotCategory corresponding to the given string.
func (SlotCategory) String ¶
func (cat SlotCategory) String() string
String implements fmt.Stringer.
type Volume ¶
type Volume struct { // Serial is the Volume Serial (VOLSER). Serial Serial // Location is the current location in the store. Location Location // Home is the home location in the store. Home Location // Category tracks the volume state. Category VolumeCategory // Flags are contains temporary info on the volume. Flags uint32 }
A Volume is an usable volume.
type VolumeCategory ¶
type VolumeCategory int
VolumeCategory represents the volume category.
const ( UnknownVolume VolumeCategory = iota Allocating Allocated Scratch Filling Full Missing Damaged Cleaning )
Known volume categories.
func ToVolumeCategory ¶
func ToVolumeCategory(str string) VolumeCategory
ToVolumeCategory returns the VolumeStatus corresponding to the given string.
func (*VolumeCategory) Scan ¶
func (cat *VolumeCategory) Scan(src interface{}) error
Scan implements sql.Scanner.
func (VolumeCategory) String ¶
func (cat VolumeCategory) String() string
String implements fmt.Stringer.
Directories
¶
Path | Synopsis |
---|---|
fake
Package fake provides a fake tape.Changer.
|
Package fake provides a fake tape.Changer. |
mtx
Package mtx provides a changer.Changer that uses the mtx command to control a SCSI media changer.
|
Package mtx provides a changer.Changer that uses the mtx command to control a SCSI media changer. |
postgres
Package postgres implements a PostgreSQL backed inv.Inventory.
|
Package postgres implements a PostgreSQL backed inv.Inventory. |
Package proto is a generated protocol buffer package.
|
Package proto is a generated protocol buffer package. |