diff options
| author | yourchanges <yourchanges@gmail.com> | 2015-02-02 15:21:55 +0800 |
|---|---|---|
| committer | yourchanges <yourchanges@gmail.com> | 2015-02-02 15:21:55 +0800 |
| commit | a2b1afce783dab0b281cf20c534e95178e62af63 (patch) | |
| tree | 57a2b1aac0bfb48b53c76f977f47203b20aae902 /go/storage | |
| parent | a86042e413e4a702c09943e53fa06f358c179e06 (diff) | |
| parent | 0e23ee4dce0f700f1aa0651bcce551336f428c85 (diff) | |
| download | seaweedfs-a2b1afce783dab0b281cf20c534e95178e62af63.tar.xz seaweedfs-a2b1afce783dab0b281cf20c534e95178e62af63.zip | |
Merge pull request #4 from chrislusf/master
merge
Diffstat (limited to 'go/storage')
| -rw-r--r-- | go/storage/store.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/go/storage/store.go b/go/storage/store.go index 7e2b23058..2c4434b81 100644 --- a/go/storage/store.go +++ b/go/storage/store.go @@ -73,8 +73,9 @@ func (mn *MasterNodes) findMaster() (string, error) { * A VolumeServer contains one Store */ type Store struct { - Port int Ip string + Port int + AdminPort int PublicUrl string Locations []*DiskLocation dataCenter string //optional informaton, overwriting master setting if exists @@ -89,8 +90,8 @@ func (s *Store) String() (str string) { return } -func NewStore(port int, ip, publicUrl string, dirnames []string, maxVolumeCounts []int) (s *Store) { - s = &Store{Port: port, Ip: ip, PublicUrl: publicUrl} +func NewStore(port, adminPort int, ip, publicUrl string, dirnames []string, maxVolumeCounts []int) (s *Store) { + s = &Store{Port: port, AdminPort: adminPort, Ip: ip, PublicUrl: publicUrl} s.Locations = make([]*DiskLocation, 0) for i := 0; i < len(dirnames); i++ { location := &DiskLocation{Directory: dirnames[i], MaxVolumeCount: maxVolumeCounts[i]} @@ -308,6 +309,7 @@ func (s *Store) Join() (masterNode string, e error) { DataCenter: proto.String(s.dataCenter), Rack: proto.String(s.rack), Volumes: volumeMessages, + AdminPort: proto.Uint32(uint32(s.AdminPort)), } data, err := proto.Marshal(joinMessage) |
