Categorygithub.com/coreos/torus
modulepackage
0.1.2
Repository: https://github.com/coreos/torus.git
Documentation: pkg.go.dev

# README

Torus

Build Status Go Report Card GoDoc

Torus is an open source project for distributed storage coordinated through etcd.

Torus provides a resource pool and basic file primitives from a set of daemons running atop multiple nodes. These primitives are made consistent by being append-only and coordinated by etcd. From these primitives, a Torus server can support multiple types of volumes, the semantics of which can be broken into subprojects. It ships with a simple block-device volume plugin, but is extensible to more.

Quick-glance overview

Sharding is done via a consistent hash function, controlled in the simple case by a hash ring algorithm, but fully extensible to arbitrary maps, rack-awareness, and other nice features. The project name comes from this: a hash 'ring' plus a 'volume' is a torus.

Project Status

Torus is at an early stage and under active development. We do not recommend its use in production, but we encourage you to try out Torus and provide feedback via issues and pull requests. Consequently, speed, while nice to have, is a secondary concern to stability at this time.

Trying out Torus

To get started quicky using Torus for the first time, start with the guide to running your first Torus cluster, learn more about setting up Torus on Kubernetes using FlexVolumes in contrib, or create a Torus cluster on bare metal.

Contributing to Torus

Torus is an open source project and contributors are welcome! Join us on IRC at #coreos on freenode.net, file an issue here on Github, check out bigger plans on the kind/design tag, contribute on bugs that are low hanging fruit for issue ideas and check the project layout for a guide to the sections that might interest you.

Licensing

Unless otherwise noted, all code in the Torus repository is licensed under the Apache 2.0 license. Some portions of the codebase are derived from other projects under different licenses; the appropriate information can be found in the header of those source files, as applicable.

# Packages

block provides the implementation of the "block" volume type, using a Torus file as a block device.
blockset provides a registry of BlockLayers, that can be (Un)Marshaled and retrieve blocks from a Torus storage interface.
No description provided by the author
No description provided by the author
distributor is a complex implementation of a Torus storage interface, that understands rebalancing it's underlying storage and fetching data from peers, as necessary.
gc provides the Torus interface for how garbage collection is implemented.
No description provided by the author
metadata is the metapackage for the implementations of the metadata interface, for each potential backend.
Package models is a generated protocol buffer package.
ring is the package containing implementations of the consistent hash ring, a pure function which provides a permutation of peers where a block can live, known by all members of the cluster.
storage is the package which implements the underlying, on-disk storage API for Torus servers.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
CreateMetadataService calls the constructor of the specified MetadataService with the provided address.
InitMDS calls the specific init function provided by a metadata package.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RegisterMetadataInit is the hook used for implementations of MetadataServices to register their ways of creating base metadata to the system.
RegisterMetadataService is the hook used for implementations of MetadataServices to register themselves to the system.
RegisterMetadataWipe is the hook used for implementations of MetadataServices to register their ways of deleting their metadata from the consistent store.
RegisterSetRing is the hook used for implementations of MetadataServices to register their ways of creating base metadata to the system.
SetRing calls the specific SetRing function provided by a metadata package.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
ErrAgain is returned if the operation was interrupted.
ErrBlockNotExist is returned when a function attempts to manipulate a non-existent block.
ErrBlockUnavailable is returned when a function fails to retrieve a known block.
ErrClosed is returned when a function attempts to manipulate a Store that is not currently open.
ErrCompareFailed is returned if the CAS operation failed to compare.
ErrExists is returned if the entity already exists.
ErrINodeUnavailable is returned when a function fails to retrieve a known INode.
ErrInvalid is a locally invalid operation (such as Close()ing a nil file pointer).
ErrIsSymlink is returned if we're trying to modify a symlink incorrectly.
ErrLeaseNotFound is returned if the lease cannot be found.
ErrLocked is returned if the resource is locked.
ErrNoGlobalMetadata is returned if the metadata service hasn't been formatted.
ErrNonSequentialRing is returned if the ring's internal version number appears to jump.
ErrNoPeer is returned if the peer can't be found.
ErrNotDir is returned if we're trying a directory operation on a non-directory path.
ErrNotExist is returned if the entity doesn't already exist.
ErrNotSupported is returned if the interface doesn't implement the requested subfunctionality.
ErrOutOfSpace is returned when the block storage is out of space.
ErrWrongVolumeType is returned if the operation cannot be performed on this type of volume.
Version is set by build scripts, do not touch.

# Structs

No description provided by the author
BlockRef is the identifier for a unique block in the cluster.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
INodeRef is a reference to a unique INode in the cluster.
No description provided by the author
No description provided by the author
Server is the type representing the generic distributed block store.

# Interfaces

No description provided by the author
Blockset is the interface representing the standardized methods to interact with a set of blocks.
BlockStore is the interface representing the standardized methods to interact with something storing blocks.
No description provided by the author
MetadataService is the interface representing the basic ways to manipulate consistently stored fileystem metadata.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Store is the interface that represents methods that should be common across all types of storage providers.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
CreateMetadataServiceFunc is the signature of a constructor used to create a registered MetadataService.
No description provided by the author
InitMDSFunc is the signature of a function which preformats a metadata service.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author