Add Openstack Swift storage driver

Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
This commit is contained in:
Sylvain Baubeau 2015-05-11 18:11:47 +02:00
parent 5ee441cdc7
commit ea7c53df08
8 changed files with 828 additions and 0 deletions

View file

@ -0,0 +1,32 @@
// +build ignore
package main
import (
"encoding/json"
"os"
"github.com/Sirupsen/logrus"
"github.com/docker/distribution/registry/storage/driver/ipc"
"github.com/docker/distribution/registry/storage/driver/swift"
)
// An out-of-process Swift driver, intended to be run by ipc.NewDriverClient
func main() {
parametersBytes := []byte(os.Args[1])
var parameters map[string]string
err := json.Unmarshal(parametersBytes, &parameters)
if err != nil {
panic(err)
}
driver, err := swift.FromParameters(parameters)
if err != nil {
panic(err)
}
if err := ipc.StorageDriverServer(driver); err != nil {
logrus.Fatalln(err)
}
}

View file

@ -28,6 +28,7 @@ import (
_ "github.com/docker/distribution/registry/storage/driver/inmemory"
_ "github.com/docker/distribution/registry/storage/driver/middleware/cloudfront"
_ "github.com/docker/distribution/registry/storage/driver/s3"
_ "github.com/docker/distribution/registry/storage/driver/swift"
"github.com/docker/distribution/version"
gorhandlers "github.com/gorilla/handlers"
"github.com/yvasiyarov/gorelic"