refactor: change masters from a slice to a map

This commit is contained in:
chrislu
2022-03-26 13:33:17 -07:00
parent 4ba7127ab1
commit 21e0898631
15 changed files with 36 additions and 21 deletions

View File

@@ -49,7 +49,7 @@ type Filer struct {
UniqueFileId uint32
}
func NewFiler(masters []pb.ServerAddress, grpcDialOption grpc.DialOption,
func NewFiler(masters map[string]pb.ServerAddress, grpcDialOption grpc.DialOption,
filerHost pb.ServerAddress, collection string, replication string, dataCenter string, notifyFn func()) *Filer {
f := &Filer{
MasterClient: wdclient.NewMasterClient(grpcDialOption, cluster.FilerType, filerHost, dataCenter, masters),