changer

package
v0.0.0-...-c8a5df3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2018 Klaus Birkelund Abildgaard Jensen

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, fn Constructor) error

Register registers a new changer.Changer implementation.

Types

type Changer

type Changer interface {
	// Transfer moves media from src to dst.
	//
	// src and dst must be storage slots.
	Transfer(src, dst tape.Location) error

	// Load moves media from source to destination. If dst is nil, the volume
	// will be loaded into the first available data transfer slot.
	//
	// dst must be a data transfer slot.
	Load(src, dst tape.Location) error

	// Unload moves volumes from src to dst. If dst is nil, the volume will be
	// returned to its home slot (if available).
	//
	// src must be a data transfer slot.
	Unload(src, dst tape.Location) error

	// Status returns info about the changer and a list of slots.
	Status() (map[tape.SlotCategory]tape.Slots, error)
}

A Changer is an automated media changer. A changer MUST be safe for concurrent use.

func Create

func Create(name string, cfg map[string]interface{}) (Changer, error)

Create creates a new Changer using the named implementation.

type Constructor

type Constructor func(map[string]interface{}) (Changer, error)

Constructor is a function that creates a Changer.

Directories

Path Synopsis
Package fake provides a fake tape.Changer.
Package fake provides a fake tape.Changer.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL