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