...

Package swift

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

Overview ▾

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).

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'.

type Driver

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

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

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

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

type Parameters struct {
    Username            string
    Password            string
    AuthURL             string
    Tenant              string
    TenantID            string
    Domain              string
    DomainID            string
    TenantDomain        string
    TenantDomainID      string
    TrustID             string
    Region              string
    AuthVersion         int
    Container           string
    Prefix              string
    EndpointType        string
    InsecureSkipVerify  bool
    ChunkSize           int
    SecretKey           string
    AccessKey           string
    TempURLContainerKey bool
    TempURLMethods      []string
}