diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-04-05 13:29:46 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-04-05 13:29:46 +0500 |
| commit | 17c6e8e39fd3dd2d3220032bd2ef0d537514257d (patch) | |
| tree | 462ede8ea61484114f2bde09b6eeb0e9e37b2ab6 /weed/wdclient/masterclient.go | |
| parent | b7cdde14ae44508c59dbf5cf3835a0a68ba1aabb (diff) | |
| parent | 3176bf126ae21395b26d6f6531c05fb571fac54f (diff) | |
| download | seaweedfs-17c6e8e39fd3dd2d3220032bd2ef0d537514257d.tar.xz seaweedfs-17c6e8e39fd3dd2d3220032bd2ef0d537514257d.zip | |
Merge branch 'new_master' into hashicorp_raft
# Conflicts:
# go.mod
# go.sum
Diffstat (limited to 'weed/wdclient/masterclient.go')
| -rw-r--r-- | weed/wdclient/masterclient.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index daf74c1be..53236fc6d 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -41,6 +41,11 @@ func (mc *MasterClient) GetMaster() pb.ServerAddress { return mc.currentMaster } +func (mc *MasterClient) GetMasters() map[string]pb.ServerAddress { + mc.WaitUntilConnected() + return mc.masters +} + func (mc *MasterClient) WaitUntilConnected() { for mc.currentMaster == "" { time.Sleep(time.Duration(rand.Int31n(200)) * time.Millisecond) |
