tapr

package module
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: 4

README

Tapr

Documentation: tapr.space

About

Tapr is an experimental high performance tape management system.

Status

Tapr is not ready for production use.

Build Status

Documentation

Overview

Package tapr includes the main Tapr types and interfaces.

This package MUST NOT import any other Tapr packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Pull arranges for the client to pull data from Tapr to an
	// io.Writer.
	Pull(name PathName, w io.Writer) error

	// PullFile is the generalized Pull call. It will pull the named file from
	// the server, starting at offset and writing to w.
	PullFile(name PathName, w io.Writer, offset int64) error

	// Push arranges for the client to push data to Tapr from an
	// io.Reader.
	Push(name PathName, r io.Reader) error

	// PushFile is the generalized Push call. It will push the named file to the
	// server at offset. If append is true, the offset will be ignored.
	PushFile(name PathName, r io.Reader, append bool) error

	// Append appends data from an io.Reader to the named file.
	Append(name PathName, r io.Reader) error

	// Stat retrieves basic file info.
	Stat(name PathName) (*FileInfo, error)
}

Client is the high-level user API towards Tapr. It is very simplified. The client is oblivious to where data is stored, but may give hints.

type Config

type Config interface {
	// Target returns the target of i/o operations.
	Target() string

	// Value returns the value for the given configuration key.
	Value(key string) string
}

Config contains client information

type Dataset

type Dataset string

A Dataset is a collection of files and directories.

type Estimate

type Estimate time.Duration

An Estimate is a time.Duration.

type File

type File interface {
	// Close closes an open file.
	Close() error

	// Name returns the full path name of the File.
	Name() string

	// Read, ReadAt, Write, WriteAt and Seek implement
	// the standard Go interfaces io.Reader, etc.
	Read(b []byte) (n int, err error)
	Write(b []byte) (n int, err error)

	// Seek sets the offset for the next Read or Write to offset,
	// interpreted according to whence: io.SeekStart means relative
	// to the start of the file, io.SeekCurrent means relative to
	// the current offset, and io.SeekEnd means relative to the end.
	// Seek returns the new offset relative to the start of the file
	// and an error, if any.
	//
	// Seeking to an offset before the start of the file is an error.
	// Seeking to any positive offset is legal, but the behavior of
	// subsequent I/O operations on the underlying object is
	// implementation-dependent.
	Seek(offset int64, whence int) (int64, error)
}

The File interface has semantics and an API that parallels a subset of Go's os.File.

type FileInfo

type FileInfo struct {
	Size int64
}

A FileInfo describes a file.

type NetAddr

type NetAddr string

A NetAddr is the network address of service. It is interpreted by Dialer's Dial method to connect to the service.

type PathName

type PathName string

A PathName is a string representing a full path name. Tapr path names are special. They may match certain pseudo-directories.

Examples

/tapr/x/(un)compress/gzip/...
/tapr/x/{en,de}crypt/<key>/...

type Stager

type Stager interface {
	Stage(ds Dataset, dst PathName) Estimate
}

Stager is an interface representing the ability to stage a dataset

Directories

Path Synopsis
Package bitmask implements simple functions for handling bitmasks/flags.
Package bitmask implements simple functions for handling bitmasks/flags.
Package client implements a tapr.Client.
Package client implements a tapr.Client.
cmd
Package errors defines the error handling used by corpus.
Package errors defines the error handling used by corpus.
Package flags defines command-line flags to make them consistent between binaries.
Package flags defines command-line flags to make them consistent between binaries.
Package format defines the interfaces that implement storage formats.
Package format defines the interfaces that implement storage formats.
ltfs
Package ltfs provides simple functions to work with LTFS volumes through the reference LTFS implementation tools.
Package ltfs provides simple functions to work with LTFS volumes through the reference LTFS implementation tools.
Package log exports logging primitives that log to stderr.
Package log exports logging primitives that log to stderr.
Package metric implements routines for generating and saving metrics associated with servers and clients.
Package metric implements routines for generating and saving metrics associated with servers and clients.
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
rpc
Package shutdown provides a mechanism for registering handlers to be called on process shutdown.
Package shutdown provides a mechanism for registering handlers to be called on process shutdown.
fsdir
Package fsdir implements a storage backend that writes to some mounted file system.
Package fsdir implements a storage backend that writes to some mounted file system.
Package store defines the interfaces that implements the basic 'store' abstraction.
Package store defines the interfaces that implements the basic 'store' abstraction.
fs/service
Package service implements a simple store.Store using an existing file system.
Package service implements a simple store.Store using an existing file system.
tape/changer/fake
Package fake provides a fake tape.Changer.
Package fake provides a fake tape.Changer.
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.
tape/inv/postgres
Package postgres implements a PostgreSQL backed inv.Inventory.
Package postgres implements a PostgreSQL backed inv.Inventory.
tape/proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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