Ejemplo n.º 1
0
// An out-of-process filesystem 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)
	}

	if err := ipc.StorageDriverServer(filesystem.FromParameters(parameters)); err != nil {
		logrus.Fatalln(err)
	}
}
Ejemplo n.º 2
0
// An out-of-process Azure Storage driver, intended to be run by ipc.NewDriverClient
func main() {
	parametersBytes := []byte(os.Args[1])
	var parameters map[string]interface{}
	err := json.Unmarshal(parametersBytes, &parameters)
	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)
	}
}
Ejemplo n.º 3
0
// An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient
// This exists primarily for example and testing purposes
func main() {
	if err := ipc.StorageDriverServer(inmemory.New()); err != nil {
		logrus.Fatalln(err)
	}
}