2014-12-05 23:34:22 +01:00
|
|
|
// +build ignore
|
|
|
|
|
2014-10-22 00:02:20 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"os"
|
|
|
|
|
2014-12-02 03:25:10 +01:00
|
|
|
"github.com/Sirupsen/logrus"
|
|
|
|
|
2015-02-11 03:14:23 +01:00
|
|
|
"github.com/docker/distribution/registry/storage/driver/filesystem"
|
|
|
|
"github.com/docker/distribution/registry/storage/driver/ipc"
|
2014-10-22 00:02:20 +02:00
|
|
|
)
|
|
|
|
|
2014-10-29 02:15:40 +01:00
|
|
|
// An out-of-process filesystem driver, intended to be run by ipc.NewDriverClient
|
2014-10-22 00:02:20 +02:00
|
|
|
func main() {
|
|
|
|
parametersBytes := []byte(os.Args[1])
|
2014-10-29 02:15:40 +01:00
|
|
|
var parameters map[string]string
|
2014-10-22 00:02:20 +02:00
|
|
|
err := json.Unmarshal(parametersBytes, ¶meters)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2014-10-29 02:15:40 +01:00
|
|
|
|
2014-12-02 03:25:10 +01:00
|
|
|
if err := ipc.StorageDriverServer(filesystem.FromParameters(parameters)); err != nil {
|
|
|
|
logrus.Fatalln(err)
|
|
|
|
}
|
2014-10-22 00:02:20 +02:00
|
|
|
}
|