Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, fn InventoryConstructor) error
Register registers a new inv.Inventory implementation.
Types ¶
type Inventory ¶
type Inventory interface { // Load transfers a volume to a drive in the context of // the given tape. Load(tape.Serial, tape.Location, changer.Changer) error // Unload transfers a volume from a drive in the context of // the given tape. Unload(tape.Serial, tape.Location, changer.Changer) error // Transfer transfers a volume to a location in the context of // the given tape. Transfer(tape.Serial, tape.Location, changer.Changer) error // Audit performs an inventory audit by inspecting the physical state of the // backing tape and makes sure the inventory reflects that state. Audit(changer.Changer) error // Alloc allocates a filling (or scratch) volume from the inventory // and mounts it into the device at the given destination. Alloc() (tape.Serial, error) // Loaded returns whether or not the given drive is loaded. Loaded(tape.Location) (bool, tape.Serial, error) // Status returns a list of known volumes. Volumes() ([]tape.Volume, error) // Update updates volume information Update(tape.Volume) error // Info retrieves info about a volume. Info(tape.Serial) (tape.Volume, error) // Reset resets the inventory database. Reset() error // Lookup looks up the given path name and returns a list of volumes that // contains the file/directory. Lookup(tapr.PathName) (tape.Volume, error) // Create creates a new node in the directory tree located on the volume // associated with the given volume serial. Create(path tapr.PathName, serial string) error }
An Inventory tracks volumes in a tape store. An inventory MUST be safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.