aboutsummaryrefslogtreecommitdiff
path: root/go/topology/topology.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/topology/topology.go')
-rw-r--r--go/topology/topology.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/go/topology/topology.go b/go/topology/topology.go
index 70a1ad268..74dc1cd09 100644
--- a/go/topology/topology.go
+++ b/go/topology/topology.go
@@ -1,12 +1,12 @@
package topology
import (
- "errors"
- "io/ioutil"
- "math/rand"
"code.google.com/p/weed-fs/go/directory"
"code.google.com/p/weed-fs/go/sequence"
"code.google.com/p/weed-fs/go/storage"
+ "errors"
+ "io/ioutil"
+ "math/rand"
)
type Topology struct {
@@ -28,7 +28,7 @@ type Topology struct {
configuration *Configuration
}
-func NewTopology(id string, confFile string, dirname string, sequenceFilename string, volumeSizeLimit uint64, pulse int) *Topology {
+func NewTopology(id string, confFile string, dirname string, sequenceFilename string, volumeSizeLimit uint64, pulse int) (*Topology, error) {
t := &Topology{}
t.id = NodeId(id)
t.nodeType = "Topology"
@@ -44,9 +44,9 @@ func NewTopology(id string, confFile string, dirname string, sequenceFilename st
t.chanRecoveredDataNodes = make(chan *DataNode)
t.chanFullVolumes = make(chan storage.VolumeInfo)
- t.loadConfiguration(confFile)
+ err := t.loadConfiguration(confFile)
- return t
+ return t, err
}
func (t *Topology) loadConfiguration(configurationFile string) error {