github.com/lusis/distribution@v2.0.1+incompatible/cmd/registry-storagedriver-filesystem/main.go (about)

     1  // +build ignore
     2  
     3  package main
     4  
     5  import (
     6  	"encoding/json"
     7  	"os"
     8  
     9  	"github.com/Sirupsen/logrus"
    10  
    11  	"github.com/docker/distribution/registry/storage/driver/filesystem"
    12  	"github.com/docker/distribution/registry/storage/driver/ipc"
    13  )
    14  
    15  // An out-of-process filesystem driver, intended to be run by ipc.NewDriverClient
    16  func main() {
    17  	parametersBytes := []byte(os.Args[1])
    18  	var parameters map[string]string
    19  	err := json.Unmarshal(parametersBytes, &parameters)
    20  	if err != nil {
    21  		panic(err)
    22  	}
    23  
    24  	if err := ipc.StorageDriverServer(filesystem.FromParameters(parameters)); err != nil {
    25  		logrus.Fatalln(err)
    26  	}
    27  }