donut

package module
v0.0.0-...-a08c7f5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

README

Donut

donut - Donut (do not delete) on disk format implementation released under Apache license v2.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	GetBucketName() string

	ListNodes() (map[string]Node, error)
	ListObjects() (map[string]Object, error)

	GetObject(object string, writer *io.PipeWriter, donutObjectMetadata map[string]string)
	PutObject(object string, contents io.Reader) error

	WriteDonutObjectMetadata(object string, donutMetadata map[string]string) error
	WriteObjectMetadata(object string, objectMetadata map[string]string) error
}

Bucket interface

func NewBucket

func NewBucket(bucketName, donutName string, nodes map[string]Node) (Bucket, error)

NewBucket - instantiate a new bucket

type Disk

type Disk interface {
	MakeDir(dirname string) error

	ListDir(dirname string) ([]os.FileInfo, error)
	ListFiles(dirname string) ([]os.FileInfo, error)

	MakeFile(path string) (*os.File, error)
	OpenFile(path string) (*os.File, error)

	GetName() string
	GetOrder() int
	GetFileSystemType() string
	SaveConfig() ([]byte, error)
	LoadConfig([]byte) error
}

Disk interface

func NewDisk

func NewDisk(diskPath string, diskOrder int) (Disk, error)

NewDisk - instantiate new disk

type Donut

type Donut interface {
	MakeBucket(bucket string) error
	ListBuckets() (map[string]Bucket, error)

	Heal() error
	Rebalance() error
	Info() error

	AttachNode(node Node) error
	DetachNode(node Node) error

	SaveConfig() ([]byte, error)
	LoadConfig([]byte) error
}

Donut interface

func NewDonut

func NewDonut(donutName string, nodeDiskMap map[string][]string) (Donut, error)

NewDonut - instantiate a new donut

type Encoder

type Encoder interface {
	GetEncodedBlockLen(dataLength int) (int, error)
	Encode(data []byte) (encodedData [][]byte, err error)
	Decode(encodedData [][]byte, dataLength int) (data []byte, err error)
}

Encoder interface

func NewEncoder

func NewEncoder(k, m uint8, technique string) (Encoder, error)

NewEncoder - instantiate a new encoder

type Node

type Node interface {
	ListDisks() (map[string]Disk, error)
	AttachDisk(disk Disk) error
	DetachDisk(disk Disk) error

	GetNodeName() string
	SaveConfig() ([]byte, error)
	LoadConfig([]byte) error
}

Node interface

func NewNode

func NewNode(hostname string) (Node, error)

NewNode - instantiates a new node

type Object

type Object interface {
	GetObjectName() string
	GetObjectMetadata() (map[string]string, error)
	GetDonutObjectMetadata() (map[string]string, error)
}

Object interface

func NewObject

func NewObject(objectName, p string) (Object, error)

NewObject - instantiate a new object

Directories

Path Synopsis
Godeps
_workspace/src/github.com/minio-io/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/minio-io/erasure
Package erasure is a Go wrapper for the Intel Intelligent Storage Acceleration Library (Intel ISA-L).
Package erasure is a Go wrapper for the Intel Intelligent Storage Acceleration Library (Intel ISA-L).
cmd

Jump to

Keyboard shortcuts

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