package swift

import "github.com/docker/distribution/registry/storage/driver/swift"

Package swift provides a storagedriver.StorageDriver implementation to store blobs in Openstack Swift object storage.

This package leverages the ncw/swift client library for interfacing with Swift.

It supports both TempAuth authentication and Keystone authentication (up to version 3).

Since Swift has no concept of directories (directories are an abstration), empty objects are created with the MIME type application/vnd.swift.directory.

As Swift has a limit on the size of a single uploaded object (by default this is 5GB), the driver makes use of the Swift Large Object Support (http://docs.openstack.org/developer/swift/overview_large_objects.html). Only one container is used for both manifests and data objects. Manifests are stored in the 'files' pseudo directory, data objects are stored under 'segments'.

Index

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is a storagedriver.StorageDriver implementation backed by Openstack Swift Objects are stored at absolute keys in the provided container.

func FromParameters

func FromParameters(parameters map[string]interface{}) (*Driver, error)

FromParameters constructs a new Driver with a given parameters map Required parameters: - username - password - authurl - container

func New

func New(params Parameters) (*Driver, error)

New constructs a new Driver with the given Openstack Swift credentials and container name

type Parameters

type Parameters struct {
	Username           string
	Password           string
	AuthURL            string
	Tenant             string
	TenantID           string
	Domain             string
	DomainID           string
	Region             string
	Container          string
	Prefix             string
	InsecureSkipVerify bool
	ChunkSize          int
}

Parameters A struct that encapsulates all of the driver parameters after all values have been set

Source Files

swift.go

Version
v2.1.1+incompatible
Published
Aug 12, 2015
Platform
js/wasm
Imports
21 packages
Last checked
7 hours ago

Tools for package owners.