@@ -62,6 +62,9 @@ func MakeFileStore(path string) *FileStore {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
log.Printf("Created directory %v", path)
|
log.Printf("Created directory %v", path)
|
||||||
|
} else {
|
||||||
|
log.Printf("Unknown error initializing filestore: %v", err)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import (
|
|||||||
func runController(port int, etcdUrl string, filepath string) {
|
func runController(port int, etcdUrl string, filepath string) {
|
||||||
// filePath will be created if it doesn't exist.
|
// filePath will be created if it doesn't exist.
|
||||||
fileStore := controller.MakeFileStore(filepath)
|
fileStore := controller.MakeFileStore(filepath)
|
||||||
|
if fileStore == nil {
|
||||||
|
log.Fatalf("Failed to initialize filestore")
|
||||||
|
}
|
||||||
|
|
||||||
rs, err := controller.MakeResourceStore(fileStore, []string{etcdUrl})
|
rs, err := controller.MakeResourceStore(fileStore, []string{etcdUrl})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user