Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

rename pacakge

Chris Lud9dd72ea560d
diff --git a/weed/election/cluster.go b/weed/cluster/cluster.go
similarity index 99%
rename from weed/election/cluster.go
rename to weed/cluster/cluster.go
index cf77771bac..11187169e8 100644
--- a/weed/election/cluster.go
+++ b/weed/cluster/cluster.go
@@ -1,4 +1,4 @@
-package election
+package cluster
import (
"github.com/chrislusf/seaweedfs/weed/pb"
diff --git a/weed/election/cluster_test.go b/weed/cluster/cluster_test.go
similarity index 98%
rename from weed/election/cluster_test.go
rename to weed/cluster/cluster_test.go
index 624ff27d6e..dd68d59b9a 100644
--- a/weed/election/cluster_test.go
+++ b/weed/cluster/cluster_test.go
@@ -1,4 +1,4 @@
-package election
+package cluster
import (
"github.com/chrislusf/seaweedfs/weed/pb"
diff --git a/weed/server/master_server.go b/weed/server/master_server.go
index 39812f6417..a73e8384e6 100644
--- a/weed/server/master_server.go
+++ b/weed/server/master_server.go
@@ -2,7 +2,7 @@ package weed_server
import (
"fmt"
- "github.com/chrislusf/seaweedfs/weed/election"
+ "github.com/chrislusf/seaweedfs/weed/cluster"
"github.com/chrislusf/seaweedfs/weed/pb"
"net/http"
"net/http/httputil"
@@ -69,7 +69,7 @@ type MasterServer struct {
adminLocks *AdminLocks
- Cluster *election.Cluster
+ Cluster *cluster.Cluster
}
func NewMasterServer(r *mux.Router, option *MasterOption, peers []pb.ServerAddress) *MasterServer {
@@ -106,7 +106,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []pb.ServerAddre
grpcDialOption: grpcDialOption,
MasterClient: wdclient.NewMasterClient(grpcDialOption, "master", option.Master, "", peers),
adminLocks: NewAdminLocks(),
- Cluster: election.NewCluster(),
+ Cluster: cluster.NewCluster(),
}
ms.boundedLeaderChan = make(chan int, 16)