blobserver

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

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

Go to latest
Published: Oct 29, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBlobSize = 128 << 20

MaxBlobSize is the max size of a single blob.

View Source
const MaxInMemory = 8 << 20

MaxInMemory is max size of a blob before we use a temporary disk file

Variables

This section is empty.

Functions

func RegisterStorageConstructor

func RegisterStorageConstructor(typ string, ctor StorageConstructor)

func StatBlob

func StatBlob(bs BlobStatter, br blob.Ref) (sb blob.SizedInfoRef, err error)

Types

type BlobReceiver

type BlobReceiver interface {
	// ReceiveBlob accepts a newly uploaded blob and writes it to
	// permanent storage.
	//
	// Implementations of BlobReceiver downstream of the HTTP
	// server can trust that the source isn't larger than
	// MaxBlobSize and that its digest matches the provided blob
	// ref. (If not, the read of the source will fail before EOF)
	ReceiveBlob(br blob.Ref, source io.Reader) (blob.SizedRef, error)
}

BlobReceiver is the interface for receiving

type BlobRemover

type BlobRemover interface {
	// RemoveBlobs removes 0 or more blobs.  Removal of
	// non-existent items isn't an error.  Returns failure if any
	// items existed but failed to be deleted.
	// ErrNotImplemented may be returned for storage types not implementing removal.
	RemoveBlobs(blobs []blob.Ref) error
}

type BlobStatter

type BlobStatter interface {
	// Stat checks for the existence of blobs, writing their sizes
	// (if found back to the dest channel), and returning an error
	// or nil.  Stat() should NOT close the channel.
	// TODO(bradfitz): redefine this to close the channel? Or document
	// better what the synchronization rules are.
	StatBlobs(dest chan<- blob.SizedInfoRef, blobs []blob.Ref) error
}

type Config

type Config struct {
	CDNUrl string
	Name   string
}

type Configer

type Configer interface {
	Config() *Config
}

type ShutdownStorage

type ShutdownStorage interface {
	Storage
	io.Closer
}

Optional interface for storage implementations which can be asked to shut down cleanly. Regardless, all implementations should be able to survive crashes without data loss.

type StatReceiver

type StatReceiver interface {
	BlobReceiver
	BlobStatter
}

type Storage

type Storage interface {
	blob.Fetcher
	BlobReceiver
	BlobStatter
	BlobRemover
}

Storage is the interface that must be implemented by a blobserver storage type. (e.g. localdisk, s3, encrypt, shard, replica, remote)

func CreateStorage

func CreateStorage(config *config.Config) (Storage, error)

type StorageConfiger

type StorageConfiger interface {
	Storage
	Configer
}

type StorageConstructor

type StorageConstructor func(*config.Config) (Storage, error)

A StorageConstructor returns a Storage implementation from a configuration.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/ncw/swift
Package swift provides an easy to use interface to Swift / Openstack Object Storage / Rackspace Cloud Files Standard Usage Most of the work is done through the Container*() and Object*() methods.
Package swift provides an easy to use interface to Swift / Openstack Object Storage / Rackspace Cloud Files Standard Usage Most of the work is done through the Container*() and Object*() methods.
_workspace/src/github.com/ncw/swift/swifttest
This implements a very basic Swift server Everything is stored in memory This comes from the https://github.com/mitchellh/goamz and was adapted for Swift
This implements a very basic Swift server Everything is stored in memory This comes from the https://github.com/mitchellh/goamz and was adapted for Swift
_workspace/src/github.com/nu7hatch/gouuid
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
_workspace/src/github.com/simonz05/util/amazon/s3
Package s3 implements a generic Amazon S3 client
Package s3 implements a generic Amazon S3 client
_workspace/src/github.com/simonz05/util/httputil
Package httputil contains a bunch of HTTP utility code
Package httputil contains a bunch of HTTP utility code
_workspace/src/github.com/simonz05/util/log
pkg log implements a logger.
pkg log implements a logger.
_workspace/src/github.com/simonz05/util/syncutil
Package syncutil provides various concurrency mechanisms.
Package syncutil provides various concurrency mechanisms.
_workspace/src/github.com/tideland/goas/v1/version
The version package helps other packages to provide information about their current version and compare it to others.
The version package helps other packages to provide information about their current version and compare it to others.
_workspace/src/github.com/tideland/goas/v2/logger
The Logger of the Go Application Support provides a flexible way to log information with different levels and on different backends.
The Logger of the Go Application Support provides a flexible way to log information with different levels and on different backends.
_workspace/src/github.com/tideland/goas/v2/loop
A typical Go idiom for concurrent applications is running a loop in the background doing a select on one or more channels.
A typical Go idiom for concurrent applications is running a loop in the background doing a select on one or more channels.
_workspace/src/github.com/tideland/goas/v2/monitoring
The monitoring package supports three kinds of system monitoring.
The monitoring package supports three kinds of system monitoring.
_workspace/src/github.com/tideland/goas/v3/errors
Typical errors in Go are often created using errors.New() or fmt.Errorf().
Typical errors in Go are often created using errors.New() or fmt.Errorf().
Package blob defines types to refer to and retrieve low-level blobs.
Package blob defines types to refer to and retrieve low-level blobs.
cmd
Package protocol contains types for Camlistore protocol types.
Package protocol contains types for Camlistore protocol types.
Package storagetest tests blobserver.Storage implementations
Package storagetest tests blobserver.Storage implementations

Jump to

Keyboard shortcuts

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