localdisk

package
v0.0.0-...-4b1b879 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2013 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package localdisk registers the "filesystem" blobserver storage type, storing blobs in a forest of sharded directories at the specified root.

Example low-level config:

"/storage/": {
    "handler": "storage-filesystem",
    "handlerArgs": {
       "path": "/var/camlistore/blobs"
     }
},

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskStorage

type DiskStorage struct {
	*blobserver.SimpleBlobHubPartitionMap
	// contains filtered or unexported fields
}

DiskStorage implements the blobserver.Storage interface using the local filesystem.

func New

func New(root string) (*DiskStorage, error)

New returns a new local disk storage implementation at the provided root directory, which must already exist.

func (*DiskStorage) CreateQueue

func (ds *DiskStorage) CreateQueue(name string) (blobserver.Storage, error)

func (*DiskStorage) EnumerateBlobs

func (ds *DiskStorage) EnumerateBlobs(dest chan<- blobref.SizedBlobRef, after string, limit int, wait time.Duration) error

func (*DiskStorage) Fetch

func (ds *DiskStorage) Fetch(blob *blobref.BlobRef) (types.ReadSeekCloser, int64, error)

func (*DiskStorage) FetchStreaming

func (ds *DiskStorage) FetchStreaming(blob *blobref.BlobRef) (io.ReadCloser, int64, error)

func (*DiskStorage) PartitionRoot

func (ds *DiskStorage) PartitionRoot(partition string) string

func (*DiskStorage) ReceiveBlob

func (ds *DiskStorage) ReceiveBlob(blobRef *blobref.BlobRef, source io.Reader) (blobGot blobref.SizedBlobRef, err error)

func (*DiskStorage) RemoveBlobs

func (ds *DiskStorage) RemoveBlobs(blobs []*blobref.BlobRef) error

func (*DiskStorage) ResetStorageGeneration

func (ds *DiskStorage) ResetStorageGeneration() error

func (*DiskStorage) StatBlobs

func (ds *DiskStorage) StatBlobs(dest chan<- blobref.SizedBlobRef, blobs []*blobref.BlobRef, wait time.Duration) error

func (*DiskStorage) StorageGeneration

func (ds *DiskStorage) StorageGeneration() (initTime time.Time, random string, err error)

Jump to

Keyboard shortcuts

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