StorageDrivers should exit non-zero on error (closes #803)
							parent
							
								
									f497bceffa
								
							
						
					
					
						commit
						54c0290cda
					
				|  | @ -4,6 +4,8 @@ import ( | ||||||
| 	"encoding/json" | 	"encoding/json" | ||||||
| 	"os" | 	"os" | ||||||
| 
 | 
 | ||||||
|  | 	"github.com/Sirupsen/logrus" | ||||||
|  | 
 | ||||||
| 	"github.com/docker/docker-registry/storagedriver/filesystem" | 	"github.com/docker/docker-registry/storagedriver/filesystem" | ||||||
| 	"github.com/docker/docker-registry/storagedriver/ipc" | 	"github.com/docker/docker-registry/storagedriver/ipc" | ||||||
| ) | ) | ||||||
|  | @ -17,5 +19,7 @@ func main() { | ||||||
| 		panic(err) | 		panic(err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	ipc.StorageDriverServer(filesystem.FromParameters(parameters)) | 	if err := ipc.StorageDriverServer(filesystem.FromParameters(parameters)); err != nil { | ||||||
|  | 		logrus.Fatalln(err) | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,7 @@ | ||||||
| package main | package main | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
|  | 	"github.com/Sirupsen/logrus" | ||||||
| 	"github.com/docker/docker-registry/storagedriver/inmemory" | 	"github.com/docker/docker-registry/storagedriver/inmemory" | ||||||
| 	"github.com/docker/docker-registry/storagedriver/ipc" | 	"github.com/docker/docker-registry/storagedriver/ipc" | ||||||
| ) | ) | ||||||
|  | @ -8,5 +9,7 @@ import ( | ||||||
| // An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient
 | // An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient
 | ||||||
| // This exists primarily for example and testing purposes
 | // This exists primarily for example and testing purposes
 | ||||||
| func main() { | func main() { | ||||||
| 	ipc.StorageDriverServer(inmemory.New()) | 	if err := ipc.StorageDriverServer(inmemory.New()); err != nil { | ||||||
|  | 		logrus.Fatalln(err) | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -4,6 +4,8 @@ import ( | ||||||
| 	"encoding/json" | 	"encoding/json" | ||||||
| 	"os" | 	"os" | ||||||
| 
 | 
 | ||||||
|  | 	"github.com/Sirupsen/logrus" | ||||||
|  | 
 | ||||||
| 	"github.com/docker/docker-registry/storagedriver/ipc" | 	"github.com/docker/docker-registry/storagedriver/ipc" | ||||||
| 	"github.com/docker/docker-registry/storagedriver/s3" | 	"github.com/docker/docker-registry/storagedriver/s3" | ||||||
| ) | ) | ||||||
|  | @ -22,5 +24,7 @@ func main() { | ||||||
| 		panic(err) | 		panic(err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	ipc.StorageDriverServer(driver) | 	if err := ipc.StorageDriverServer(driver); err != nil { | ||||||
|  | 		logrus.Fatalln(err) | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue