// 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, ¶meters) if err != nil { panic(err) } if err := ipc.StorageDriverServer(filesystem.FromParameters(parameters)); err != nil { logrus.Fatalln(err) } }
// 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, ¶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) } }
// 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) } }