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 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 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.
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. |
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. |
Click to show internal directories.
Click to hide internal directories.