diff --git a/.gitignore b/.gitignore index 71e48f7f2..cb0085ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -go/weed/.goxc* -go/weed/vendor +.goxc* +vendor tags *.swp ### OSX template diff --git a/Dockerfile.go_build b/Dockerfile.go_build index 7e0f57a95..9fa927a41 100644 --- a/Dockerfile.go_build +++ b/Dockerfile.go_build @@ -1,5 +1,5 @@ FROM cydev/go -RUN go get github.com/chrislusf/seaweedfs/go/weed +RUN go get github.com/chrislusf/seaweedfs/weed/weed EXPOSE 8080 EXPOSE 9333 VOLUME /data diff --git a/README.md b/README.md index 0ff94e51f..022f7d24a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # SeaweedFS [![Build Status](https://travis-ci.org/chrislusf/seaweedfs.svg?branch=master)](https://travis-ci.org/chrislusf/seaweedfs) -[![GoDoc](https://godoc.org/github.com/chrislusf/seaweedfs/go?status.svg)](https://godoc.org/github.com/chrislusf/seaweedfs/go) +[![GoDoc](https://godoc.org/github.com/chrislusf/seaweedfs/weed?status.svg)](https://godoc.org/github.com/chrislusf/seaweedfs/weed) [![Wiki](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/chrislusf/seaweedfs/wiki) ![SeaweedFS Logo](https://raw.githubusercontent.com/chrislusf/seaweedfs/master/note/seaweedfs.png) @@ -287,11 +287,11 @@ http://mercurial.selenic.com/downloads step 3: download, compile, and install the project by executing the following command -go get github.com/chrislusf/seaweedfs/go/weed +go get github.com/chrislusf/seaweedfs/weed/weed once this is done, you should see the executable "weed" under $GOPATH/bin -step 4: after you modify your code locally, you could start a local build by calling "go install" under $GOPATH/src/github.com/chrislusf/seaweedfs/go/weed +step 4: after you modify your code locally, you could start a local build by calling "go install" under $GOPATH/src/github.com/chrislusf/seaweedfs/weed/weed ## Disk Related topics ## diff --git a/go/weed/glide.yaml b/go/weed/glide.yaml deleted file mode 100644 index d619b8727..000000000 --- a/go/weed/glide.yaml +++ /dev/null @@ -1,16 +0,0 @@ -package: github.com/chrislusf/seaweedfs/go/weed -import: -- package: bazil.org/fuse - subpackages: - - fs -- package: github.com/chrislusf/raft -- package: github.com/golang/protobuf - subpackages: - - proto -- package: github.com/gorilla/mux -- package: github.com/syndtr/goleveldb - subpackages: - - leveldb -- package: golang.org/x/net - subpackages: - - context diff --git a/unmaintained/fix_dat/fix_dat.go b/unmaintained/fix_dat/fix_dat.go index 5d35686f4..bcb985fe9 100644 --- a/unmaintained/fix_dat/fix_dat.go +++ b/unmaintained/fix_dat/fix_dat.go @@ -8,9 +8,9 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/unmaintained/see_idx/see_idx.go b/unmaintained/see_idx/see_idx.go index c1e80184a..e7735b9a1 100644 --- a/unmaintained/see_idx/see_idx.go +++ b/unmaintained/see_idx/see_idx.go @@ -6,8 +6,8 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) var ( diff --git a/go/weed/backup.go b/weed/command/backup.go similarity index 95% rename from go/weed/backup.go rename to weed/command/backup.go index 5e51a8b03..0b3994027 100644 --- a/go/weed/backup.go +++ b/weed/command/backup.go @@ -1,10 +1,10 @@ -package main +package command import ( "fmt" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" ) var ( diff --git a/go/weed/benchmark.go b/weed/command/benchmark.go similarity index 98% rename from go/weed/benchmark.go rename to weed/command/benchmark.go index b63f0008e..7e0802e30 100644 --- a/go/weed/benchmark.go +++ b/weed/command/benchmark.go @@ -1,4 +1,4 @@ -package main +package command import ( "bufio" @@ -14,10 +14,10 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" ) type BenchmarkOptions struct { diff --git a/go/weed/command.go b/weed/command/command.go similarity index 85% rename from go/weed/command.go rename to weed/command/command.go index c8d86ca66..d654f57cd 100644 --- a/go/weed/command.go +++ b/weed/command/command.go @@ -1,4 +1,4 @@ -package main +package command import ( "flag" @@ -7,6 +7,23 @@ import ( "strings" ) +var Commands = []*Command{ + cmdBenchmark, + cmdBackup, + cmdCompact, + cmdFix, + cmdServer, + cmdMaster, + cmdFiler, + cmdUpload, + cmdDownload, + cmdShell, + cmdVersion, + cmdVolume, + cmdExport, + cmdMount, +} + type Command struct { // Run runs the command. // The args are the arguments after the command name. diff --git a/go/weed/compact.go b/weed/command/compact.go similarity index 91% rename from go/weed/compact.go rename to weed/command/compact.go index 673b96901..ba2fbf867 100644 --- a/go/weed/compact.go +++ b/weed/command/compact.go @@ -1,8 +1,8 @@ -package main +package command import ( - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) func init() { diff --git a/go/weed/download.go b/weed/command/download.go similarity index 96% rename from go/weed/download.go rename to weed/command/download.go index 2e948a056..39ed2b38e 100644 --- a/go/weed/download.go +++ b/weed/command/download.go @@ -1,4 +1,4 @@ -package main +package command import ( "fmt" @@ -8,8 +8,8 @@ import ( "path" "strings" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/go/weed/export.go b/weed/command/export.go similarity index 98% rename from go/weed/export.go rename to weed/command/export.go index 4417c65f4..481aa111b 100644 --- a/go/weed/export.go +++ b/weed/command/export.go @@ -1,4 +1,4 @@ -package main +package command import ( "archive/tar" @@ -12,8 +12,8 @@ import ( "text/template" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) const ( diff --git a/go/weed/filer.go b/weed/command/filer.go similarity index 96% rename from go/weed/filer.go rename to weed/command/filer.go index 68bc3e407..582d4e9c8 100644 --- a/go/weed/filer.go +++ b/weed/command/filer.go @@ -1,4 +1,4 @@ -package main +package command import ( "net/http" @@ -6,9 +6,9 @@ import ( "strconv" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" - "github.com/chrislusf/seaweedfs/go/weed/weed_server" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/go/weed/fix.go b/weed/command/fix.go similarity index 94% rename from go/weed/fix.go rename to weed/command/fix.go index 3abcbc31c..2ec74d026 100644 --- a/go/weed/fix.go +++ b/weed/command/fix.go @@ -1,12 +1,12 @@ -package main +package command import ( "os" "path" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) func init() { diff --git a/go/weed/master.go b/weed/command/master.go similarity index 95% rename from go/weed/master.go rename to weed/command/master.go index fda19429d..aed8fc793 100644 --- a/go/weed/master.go +++ b/weed/command/master.go @@ -1,4 +1,4 @@ -package main +package command import ( "net/http" @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" - "github.com/chrislusf/seaweedfs/go/weed/weed_server" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" ) diff --git a/go/weed/mount.go b/weed/command/mount.go similarity index 98% rename from go/weed/mount.go rename to weed/command/mount.go index e6f46c392..d6e87d76c 100644 --- a/go/weed/mount.go +++ b/weed/command/mount.go @@ -1,4 +1,4 @@ -package main +package command type MountOptions struct { filer *string diff --git a/go/weed/mount_notsupported.go b/weed/command/mount_notsupported.go similarity index 92% rename from go/weed/mount_notsupported.go rename to weed/command/mount_notsupported.go index bc77ffa16..3bf22ddc4 100644 --- a/go/weed/mount_notsupported.go +++ b/weed/command/mount_notsupported.go @@ -1,7 +1,7 @@ // +build !linux // +build !darwin -package main +package command import ( "fmt" diff --git a/go/weed/mount_std.go b/weed/command/mount_std.go similarity index 92% rename from go/weed/mount_std.go rename to weed/command/mount_std.go index db097fb1d..b086d8cbf 100644 --- a/go/weed/mount_std.go +++ b/weed/command/mount_std.go @@ -1,6 +1,6 @@ // +build linux darwin -package main +package command import ( "fmt" @@ -8,10 +8,10 @@ import ( "bazil.org/fuse" "bazil.org/fuse/fs" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/filer" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" "golang.org/x/net/context" ) diff --git a/go/weed/server.go b/weed/command/server.go similarity index 98% rename from go/weed/server.go rename to weed/command/server.go index 242e50861..6ed1e5228 100644 --- a/go/weed/server.go +++ b/weed/command/server.go @@ -1,4 +1,4 @@ -package main +package command import ( "net/http" @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" - "github.com/chrislusf/seaweedfs/go/weed/weed_server" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" ) diff --git a/go/weed/shell.go b/weed/command/shell.go similarity index 94% rename from go/weed/shell.go rename to weed/command/shell.go index 144621b09..19c5049c5 100644 --- a/go/weed/shell.go +++ b/weed/command/shell.go @@ -1,11 +1,11 @@ -package main +package command import ( "bufio" "fmt" "os" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func init() { diff --git a/go/weed/signal_handling.go b/weed/command/signal_handling.go similarity index 96% rename from go/weed/signal_handling.go rename to weed/command/signal_handling.go index a8f166382..182e2754d 100644 --- a/go/weed/signal_handling.go +++ b/weed/command/signal_handling.go @@ -1,6 +1,6 @@ // +build !plan9 -package main +package command import ( "os" diff --git a/go/weed/signal_handling_notsupported.go b/weed/command/signal_handling_notsupported.go similarity index 75% rename from go/weed/signal_handling_notsupported.go rename to weed/command/signal_handling_notsupported.go index 343cf7de2..dfcc24a3e 100644 --- a/go/weed/signal_handling_notsupported.go +++ b/weed/command/signal_handling_notsupported.go @@ -1,6 +1,6 @@ // +build plan9 -package main +package command func OnInterrupt(fn func()) { } diff --git a/go/weed/upload.go b/weed/command/upload.go similarity index 97% rename from go/weed/upload.go rename to weed/command/upload.go index df0e359b9..0dfa115bb 100644 --- a/go/weed/upload.go +++ b/weed/command/upload.go @@ -1,4 +1,4 @@ -package main +package command import ( "encoding/json" @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/security" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" ) var ( diff --git a/go/weed/version.go b/weed/command/version.go similarity index 86% rename from go/weed/version.go rename to weed/command/version.go index 8fef546f4..8fdd68ec8 100644 --- a/go/weed/version.go +++ b/weed/command/version.go @@ -1,10 +1,10 @@ -package main +package command import ( "fmt" "runtime" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" ) var cmdVersion = &Command{ diff --git a/go/weed/volume.go b/weed/command/volume.go similarity index 96% rename from go/weed/volume.go rename to weed/command/volume.go index f1b12dae8..21369cbe9 100644 --- a/go/weed/volume.go +++ b/weed/command/volume.go @@ -1,4 +1,4 @@ -package main +package command import ( "net/http" @@ -8,10 +8,10 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" - "github.com/chrislusf/seaweedfs/go/weed/weed_server" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/go/weed/volume_test.go b/weed/command/volume_test.go similarity index 74% rename from go/weed/volume_test.go rename to weed/command/volume_test.go index ba06cb985..7399f1248 100644 --- a/go/weed/volume_test.go +++ b/weed/command/volume_test.go @@ -1,11 +1,11 @@ -package main +package command import ( "net/http" "testing" "time" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func TestXYZ(t *testing.T) { diff --git a/go/compress/compression_test.go b/weed/compress/compression_test.go similarity index 100% rename from go/compress/compression_test.go rename to weed/compress/compression_test.go diff --git a/go/compress/delta_binary_pack32.go b/weed/compress/delta_binary_pack32.go similarity index 100% rename from go/compress/delta_binary_pack32.go rename to weed/compress/delta_binary_pack32.go diff --git a/go/filer/cassandra_store/cassandra_store.go b/weed/filer/cassandra_store/cassandra_store.go similarity index 98% rename from go/filer/cassandra_store/cassandra_store.go rename to weed/filer/cassandra_store/cassandra_store.go index 1c2be8a8e..4ee2f65be 100644 --- a/go/filer/cassandra_store/cassandra_store.go +++ b/weed/filer/cassandra_store/cassandra_store.go @@ -3,7 +3,7 @@ package cassandra_store import ( "fmt" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/gocql/gocql" ) diff --git a/go/filer/cassandra_store/schema.cql b/weed/filer/cassandra_store/schema.cql similarity index 100% rename from go/filer/cassandra_store/schema.cql rename to weed/filer/cassandra_store/schema.cql diff --git a/go/filer/client_operations.go b/weed/filer/client_operations.go similarity index 97% rename from go/filer/client_operations.go rename to weed/filer/client_operations.go index 80ac51693..13e4854a4 100644 --- a/go/filer/client_operations.go +++ b/weed/filer/client_operations.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" "net/url" ) diff --git a/go/filer/embedded_filer/design.txt b/weed/filer/embedded_filer/design.txt similarity index 100% rename from go/filer/embedded_filer/design.txt rename to weed/filer/embedded_filer/design.txt diff --git a/go/filer/embedded_filer/directory.go b/weed/filer/embedded_filer/directory.go similarity index 91% rename from go/filer/embedded_filer/directory.go rename to weed/filer/embedded_filer/directory.go index 7c50e7185..4d4bd1c59 100644 --- a/go/filer/embedded_filer/directory.go +++ b/weed/filer/embedded_filer/directory.go @@ -1,7 +1,7 @@ package embedded_filer import ( - "github.com/chrislusf/seaweedfs/go/filer" + "github.com/chrislusf/seaweedfs/weed/filer" ) type DirectoryManager interface { diff --git a/go/filer/embedded_filer/directory_in_map.go b/weed/filer/embedded_filer/directory_in_map.go similarity index 98% rename from go/filer/embedded_filer/directory_in_map.go rename to weed/filer/embedded_filer/directory_in_map.go index c67922541..5100f3531 100644 --- a/go/filer/embedded_filer/directory_in_map.go +++ b/weed/filer/embedded_filer/directory_in_map.go @@ -10,8 +10,8 @@ import ( "strings" "sync" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/filer" + "github.com/chrislusf/seaweedfs/weed/util" ) var writeLock sync.Mutex //serialize changes to dir.log diff --git a/go/filer/embedded_filer/directory_test.go b/weed/filer/embedded_filer/directory_test.go similarity index 100% rename from go/filer/embedded_filer/directory_test.go rename to weed/filer/embedded_filer/directory_test.go diff --git a/go/filer/embedded_filer/filer_embedded.go b/weed/filer/embedded_filer/filer_embedded.go similarity index 97% rename from go/filer/embedded_filer/filer_embedded.go rename to weed/filer/embedded_filer/filer_embedded.go index f467334de..27299eb40 100644 --- a/go/filer/embedded_filer/filer_embedded.go +++ b/weed/filer/embedded_filer/filer_embedded.go @@ -6,8 +6,8 @@ import ( "path/filepath" "strings" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/operation" + "github.com/chrislusf/seaweedfs/weed/filer" + "github.com/chrislusf/seaweedfs/weed/operation" ) type FilerEmbedded struct { diff --git a/go/filer/embedded_filer/files_in_leveldb.go b/weed/filer/embedded_filer/files_in_leveldb.go similarity index 96% rename from go/filer/embedded_filer/files_in_leveldb.go rename to weed/filer/embedded_filer/files_in_leveldb.go index b0b410a26..19f6dd7e8 100644 --- a/go/filer/embedded_filer/files_in_leveldb.go +++ b/weed/filer/embedded_filer/files_in_leveldb.go @@ -3,8 +3,8 @@ package embedded_filer import ( "bytes" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/filer" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/go/filer/filer.go b/weed/filer/filer.go similarity index 100% rename from go/filer/filer.go rename to weed/filer/filer.go diff --git a/go/filer/flat_namespace/flat_namespace_filer.go b/weed/filer/flat_namespace/flat_namespace_filer.go similarity index 96% rename from go/filer/flat_namespace/flat_namespace_filer.go rename to weed/filer/flat_namespace/flat_namespace_filer.go index 9959b2924..c20fd2521 100644 --- a/go/filer/flat_namespace/flat_namespace_filer.go +++ b/weed/filer/flat_namespace/flat_namespace_filer.go @@ -3,7 +3,7 @@ package flat_namespace import ( "errors" - "github.com/chrislusf/seaweedfs/go/filer" + "github.com/chrislusf/seaweedfs/weed/filer" ) type FlatNamespaceFiler struct { diff --git a/go/filer/flat_namespace/flat_namespace_store.go b/weed/filer/flat_namespace/flat_namespace_store.go similarity index 100% rename from go/filer/flat_namespace/flat_namespace_store.go rename to weed/filer/flat_namespace/flat_namespace_store.go diff --git a/go/filer/redis_store/redis_store.go b/weed/filer/redis_store/redis_store.go similarity index 100% rename from go/filer/redis_store/redis_store.go rename to weed/filer/redis_store/redis_store.go diff --git a/go/weed/glide.lock b/weed/glide.lock similarity index 69% rename from go/weed/glide.lock rename to weed/glide.lock index 3575d14d5..047c89eae 100644 --- a/go/weed/glide.lock +++ b/weed/glide.lock @@ -1,5 +1,5 @@ -hash: 97328ff2a0b9e682660bd51e424a7f850388df96bd153fa6f9ee419c993065c1 -updated: 2016-05-24T10:27:49.252798956-07:00 +hash: fc2f4ccfa5d703b62b9c93047bae2295e6926ce1603c2164510c9010ff829945 +updated: 2016-06-02T12:26:29.018990826-07:00 imports: - name: bazil.org/fuse version: 5d02b06737b3b3c2e6a44e03348b6f2b44aa6835 @@ -9,33 +9,33 @@ imports: - name: github.com/boltdb/bolt version: dfb21201d9270c1082d5fb0f07f500311ff72f18 - name: github.com/chrislusf/raft - version: 90f631ee823c83f594f27257bab64911190856af + version: 5f7ddd8f479583daf05879d3d3b174aa202c8fb7 subpackages: - protobuf - name: github.com/dgrijalva/jwt-go - version: 40bd0f3b4891a9d7f121bfb7b8e8b0525625e262 + version: 9b486c879bab3fde556ce8c27d9a2bb05d5b2c60 - name: github.com/disintegration/imaging version: d8bbae1de109b518dabc98c6c1633eb358c148a4 - name: github.com/gocql/gocql - version: 7218e81e87ca6f3d2285c56e0aae80bc0d8fb655 + version: b7b8a0e04b0cb0ca0b379421c58ec6fab9939b85 subpackages: - internal/lru - internal/murmur - internal/streams - name: github.com/gogo/protobuf - version: c18eea6ad611eecf94a9ba38471f59706199409e + version: 7883e1468d48d969e1c3ce4bcde89b6a7dd4adc4 subpackages: - proto - name: github.com/golang/protobuf - version: e51d002c610dbe8c136679a67a6ded5df4d49b5c + version: 3b06fc7a4cad73efce5fe6217ab6c33e7231ab4a subpackages: - proto - name: github.com/golang/snappy - version: d6668316e43571d7dde95be6fd077f96de002f8b + version: d9eb7a3d35ec988b8585d4a0068e462c27d28380 - name: github.com/gorilla/context - version: a8d44e7d8e4d532b6a27a02dd82abb31cc1b01bd + version: aed02d124ae4a0e94fea4541c8effd05bf0c8296 - name: github.com/gorilla/mux - version: 9c19ed558d5df4da88e2ade9c8940d742aef0e7e + version: bd09be08ed4377796d312df0a45314e11b8f5dc1 - name: github.com/hailocab/go-hostpool version: e80d13ce29ede4452c43dea11e79b9bc8a15b478 - name: github.com/hashicorp/golang-lru @@ -44,6 +44,12 @@ imports: - simplelru - name: github.com/klauspost/crc32 version: 19b0b332c9e4516a6370a0456e6182c3b5036720 +- name: github.com/reducedb/encoding + version: e31efcfdf1b19f4698709a6f522feaf101b1b1f4 + subpackages: + - cursor + - delta/bp32 + - bitpacking - name: github.com/rwcarlsen/goexif version: 709fab3d192d7c62f86043caff1e7e3fb0f42bd8 subpackages: @@ -65,17 +71,17 @@ imports: - leveldb/storage - leveldb/table - name: golang.org/x/image - version: f551d3a6b7fc11df315ad9e18b404280680f8bec + version: 97680175a5267bb8b31f1923e7a66df98013b11a subpackages: - bmp - tiff - tiff/lzw - name: golang.org/x/net - version: 0c607074acd38c5f23d1344dfe74c977464d1257 + version: c4c3ea71919de159c9e246d7be66deb7f0a39a58 subpackages: - context - name: golang.org/x/sys - version: d4feaf1a7e61e1d9e79e6c4e76c6349e9cab0a03 + version: 076b546753157f758b316e59bcb51e6807c04057 subpackages: - unix - name: gopkg.in/bufio.v1 diff --git a/weed/glide.yaml b/weed/glide.yaml new file mode 100644 index 000000000..e58b3679e --- /dev/null +++ b/weed/glide.yaml @@ -0,0 +1,31 @@ +package: github.com/chrislusf/seaweedfs/weed +import: +- package: bazil.org/fuse + subpackages: + - fs +- package: github.com/boltdb/bolt +- package: github.com/chrislusf/raft +- package: github.com/dgrijalva/jwt-go +- package: github.com/disintegration/imaging +- package: github.com/gocql/gocql +- package: github.com/golang/protobuf + subpackages: + - proto +- package: github.com/gorilla/mux +- package: github.com/hashicorp/golang-lru +- package: github.com/klauspost/crc32 +- package: github.com/reducedb/encoding + subpackages: + - cursor + - delta/bp32 +- package: github.com/rwcarlsen/goexif + subpackages: + - exif +- package: github.com/syndtr/goleveldb + subpackages: + - leveldb + - leveldb/util +- package: golang.org/x/net + subpackages: + - context +- package: gopkg.in/redis.v2 diff --git a/go/glog/LICENSE b/weed/glog/LICENSE similarity index 100% rename from go/glog/LICENSE rename to weed/glog/LICENSE diff --git a/go/glog/README b/weed/glog/README similarity index 100% rename from go/glog/README rename to weed/glog/README diff --git a/go/glog/convenient_api.go b/weed/glog/convenient_api.go similarity index 100% rename from go/glog/convenient_api.go rename to weed/glog/convenient_api.go diff --git a/go/glog/glog.go b/weed/glog/glog.go similarity index 100% rename from go/glog/glog.go rename to weed/glog/glog.go diff --git a/go/glog/glog_file.go b/weed/glog/glog_file.go similarity index 100% rename from go/glog/glog_file.go rename to weed/glog/glog_file.go diff --git a/go/glog/glog_test.go b/weed/glog/glog_test.go similarity index 100% rename from go/glog/glog_test.go rename to weed/glog/glog_test.go diff --git a/go/images/favicon.go b/weed/images/favicon.go similarity index 100% rename from go/images/favicon.go rename to weed/images/favicon.go diff --git a/go/images/favicon/favicon.ico b/weed/images/favicon/favicon.ico similarity index 100% rename from go/images/favicon/favicon.ico rename to weed/images/favicon/favicon.ico diff --git a/go/images/orientation.go b/weed/images/orientation.go similarity index 100% rename from go/images/orientation.go rename to weed/images/orientation.go diff --git a/go/images/orientation_test.go b/weed/images/orientation_test.go similarity index 100% rename from go/images/orientation_test.go rename to weed/images/orientation_test.go diff --git a/go/images/preprocess.go b/weed/images/preprocess.go similarity index 100% rename from go/images/preprocess.go rename to weed/images/preprocess.go diff --git a/go/images/resizing.go b/weed/images/resizing.go similarity index 96% rename from go/images/resizing.go rename to weed/images/resizing.go index 1f4b71fd4..7e4a88c42 100644 --- a/go/images/resizing.go +++ b/weed/images/resizing.go @@ -7,7 +7,7 @@ import ( "image/jpeg" "image/png" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/disintegration/imaging" ) diff --git a/go/images/sample1.jpg b/weed/images/sample1.jpg similarity index 100% rename from go/images/sample1.jpg rename to weed/images/sample1.jpg diff --git a/go/operation/assign_file_id.go b/weed/operation/assign_file_id.go similarity index 92% rename from go/operation/assign_file_id.go rename to weed/operation/assign_file_id.go index fa436b651..acc2d3034 100644 --- a/go/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -7,8 +7,8 @@ import ( "net/url" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type AssignResult struct { diff --git a/go/operation/chunked_file.go b/weed/operation/chunked_file.go similarity index 98% rename from go/operation/chunked_file.go rename to weed/operation/chunked_file.go index 786b8a989..52086514a 100644 --- a/go/operation/chunked_file.go +++ b/weed/operation/chunked_file.go @@ -10,8 +10,8 @@ import ( "sync" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/go/operation/compress.go b/weed/operation/compress.go similarity index 96% rename from go/operation/compress.go rename to weed/operation/compress.go index b1105ba4b..de62e5bf7 100644 --- a/go/operation/compress.go +++ b/weed/operation/compress.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "strings" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) /* diff --git a/go/operation/data_struts.go b/weed/operation/data_struts.go similarity index 100% rename from go/operation/data_struts.go rename to weed/operation/data_struts.go diff --git a/go/operation/delete_content.go b/weed/operation/delete_content.go similarity index 96% rename from go/operation/delete_content.go rename to weed/operation/delete_content.go index c808cc75a..b78221da1 100644 --- a/go/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -10,8 +10,8 @@ import ( "net/http" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" ) type DeleteResult struct { diff --git a/go/operation/list_masters.go b/weed/operation/list_masters.go similarity index 88% rename from go/operation/list_masters.go rename to weed/operation/list_masters.go index bda6f3c65..0a15b0af8 100644 --- a/go/operation/list_masters.go +++ b/weed/operation/list_masters.go @@ -3,8 +3,8 @@ package operation import ( "encoding/json" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type ClusterStatusResult struct { diff --git a/go/operation/lookup.go b/weed/operation/lookup.go similarity index 98% rename from go/operation/lookup.go rename to weed/operation/lookup.go index f77d1ec9b..19d9dbb94 100644 --- a/go/operation/lookup.go +++ b/weed/operation/lookup.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" ) type Location struct { diff --git a/go/operation/lookup_vid_cache.go b/weed/operation/lookup_vid_cache.go similarity index 96% rename from go/operation/lookup_vid_cache.go rename to weed/operation/lookup_vid_cache.go index ac4240102..1ed03613d 100644 --- a/go/operation/lookup_vid_cache.go +++ b/weed/operation/lookup_vid_cache.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type VidInfo struct { diff --git a/go/operation/lookup_vid_cache_test.go b/weed/operation/lookup_vid_cache_test.go similarity index 100% rename from go/operation/lookup_vid_cache_test.go rename to weed/operation/lookup_vid_cache_test.go diff --git a/go/operation/submit.go b/weed/operation/submit.go similarity index 98% rename from go/operation/submit.go rename to weed/operation/submit.go index 18484680a..19bbd7a70 100644 --- a/go/operation/submit.go +++ b/weed/operation/submit.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/security" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" ) type FilePart struct { diff --git a/go/operation/sync_volume.go b/weed/operation/sync_volume.go similarity index 94% rename from go/operation/sync_volume.go rename to weed/operation/sync_volume.go index 54944a64e..b7a727fc7 100644 --- a/go/operation/sync_volume.go +++ b/weed/operation/sync_volume.go @@ -5,8 +5,8 @@ import ( "fmt" "net/url" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type SyncVolumeResponse struct { diff --git a/go/operation/system_message.pb.go b/weed/operation/system_message.pb.go similarity index 100% rename from go/operation/system_message.pb.go rename to weed/operation/system_message.pb.go diff --git a/go/operation/system_message_test.go b/weed/operation/system_message_test.go similarity index 100% rename from go/operation/system_message_test.go rename to weed/operation/system_message_test.go diff --git a/go/operation/upload_content.go b/weed/operation/upload_content.go similarity index 96% rename from go/operation/upload_content.go rename to weed/operation/upload_content.go index c3fd5f4b1..a87784cad 100644 --- a/go/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -14,8 +14,8 @@ import ( "path/filepath" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/security" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" ) type UploadResult struct { diff --git a/go/proto/Makefile b/weed/proto/Makefile similarity index 100% rename from go/proto/Makefile rename to weed/proto/Makefile diff --git a/go/proto/system_message.proto b/weed/proto/system_message.proto similarity index 100% rename from go/proto/system_message.proto rename to weed/proto/system_message.proto diff --git a/go/security/guard.go b/weed/security/guard.go similarity index 98% rename from go/security/guard.go rename to weed/security/guard.go index 1ee1bbd89..76f64cc0e 100644 --- a/go/security/guard.go +++ b/weed/security/guard.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) var ( diff --git a/go/security/jwt.go b/weed/security/jwt.go similarity index 97% rename from go/security/jwt.go rename to weed/security/jwt.go index a29a94b3c..a2472ca6e 100644 --- a/go/security/jwt.go +++ b/weed/security/jwt.go @@ -6,7 +6,7 @@ import ( "time" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" jwt "github.com/dgrijalva/jwt-go" ) diff --git a/go/sequence/memory_sequencer.go b/weed/sequence/memory_sequencer.go similarity index 100% rename from go/sequence/memory_sequencer.go rename to weed/sequence/memory_sequencer.go diff --git a/go/sequence/sequence.go b/weed/sequence/sequence.go similarity index 100% rename from go/sequence/sequence.go rename to weed/sequence/sequence.go diff --git a/go/weed/weed_server/common.go b/weed/server/common.go similarity index 94% rename from go/weed/weed_server/common.go rename to weed/server/common.go index a7fa2de53..312bcea14 100644 --- a/go/weed/weed_server/common.go +++ b/weed/server/common.go @@ -11,12 +11,12 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/stats" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) var serverStats *stats.ServerStats diff --git a/go/weed/weed_server/filer_server.go b/weed/server/filer_server.go similarity index 82% rename from go/weed/weed_server/filer_server.go rename to weed/server/filer_server.go index e3c45d9e5..ee7eaf886 100644 --- a/go/weed/weed_server/filer_server.go +++ b/weed/server/filer_server.go @@ -4,13 +4,13 @@ import ( "net/http" "strconv" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/filer/cassandra_store" - "github.com/chrislusf/seaweedfs/go/filer/embedded_filer" - "github.com/chrislusf/seaweedfs/go/filer/flat_namespace" - "github.com/chrislusf/seaweedfs/go/filer/redis_store" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/security" + "github.com/chrislusf/seaweedfs/weed/filer" + "github.com/chrislusf/seaweedfs/weed/filer/cassandra_store" + "github.com/chrislusf/seaweedfs/weed/filer/embedded_filer" + "github.com/chrislusf/seaweedfs/weed/filer/flat_namespace" + "github.com/chrislusf/seaweedfs/weed/filer/redis_store" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" ) type FilerServer struct { diff --git a/go/weed/weed_server/filer_server_handlers.go b/weed/server/filer_server_handlers.go similarity index 97% rename from go/weed/weed_server/filer_server_handlers.go rename to weed/server/filer_server_handlers.go index efc4c0381..d6b98976b 100644 --- a/go/weed/weed_server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -11,10 +11,10 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/go/weed/weed_server/filer_server_handlers_admin.go b/weed/server/filer_server_handlers_admin.go similarity index 92% rename from go/weed/weed_server/filer_server_handlers_admin.go rename to weed/server/filer_server_handlers_admin.go index 2f317ff79..979ad517b 100644 --- a/go/weed/weed_server/filer_server_handlers_admin.go +++ b/weed/server/filer_server_handlers_admin.go @@ -3,7 +3,7 @@ package weed_server import ( "net/http" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) /* diff --git a/go/weed/weed_server/master_server.go b/weed/server/master_server.go similarity index 95% rename from go/weed/weed_server/master_server.go rename to weed/server/master_server.go index db70ca6b1..61bda6988 100644 --- a/go/weed/weed_server/master_server.go +++ b/weed/server/master_server.go @@ -8,11 +8,11 @@ import ( "sync" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/sequence" - "github.com/chrislusf/seaweedfs/go/topology" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" ) diff --git a/go/weed/weed_server/master_server_handlers.go b/weed/server/master_server_handlers.go similarity index 95% rename from go/weed/weed_server/master_server_handlers.go rename to weed/server/master_server_handlers.go index 2be5d9524..e811631f8 100644 --- a/go/weed/weed_server/master_server_handlers.go +++ b/weed/server/master_server_handlers.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/stats" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage" ) func (ms *MasterServer) lookupVolumeId(vids []string, collection string) (volumeLocations map[string]operation.LookupResult) { diff --git a/go/weed/weed_server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go similarity index 96% rename from go/weed/weed_server/master_server_handlers_admin.go rename to weed/server/master_server_handlers_admin.go index 07399596a..a762bf416 100644 --- a/go/weed/weed_server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -10,11 +10,11 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/topology" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/go/weed/weed_server/master_server_handlers_ui.go b/weed/server/master_server_handlers_ui.go similarity index 77% rename from go/weed/weed_server/master_server_handlers_ui.go rename to weed/server/master_server_handlers_ui.go index af7261ab3..9ad234877 100644 --- a/go/weed/weed_server/master_server_handlers_ui.go +++ b/weed/server/master_server_handlers_ui.go @@ -3,9 +3,9 @@ package weed_server import ( "net/http" - "github.com/chrislusf/seaweedfs/go/stats" - "github.com/chrislusf/seaweedfs/go/util" - ui "github.com/chrislusf/seaweedfs/go/weed/weed_server/master_ui" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" + ui "github.com/chrislusf/seaweedfs/weed/server/master_ui" ) func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/master_ui/templates.go b/weed/server/master_ui/templates.go similarity index 100% rename from go/weed/weed_server/master_ui/templates.go rename to weed/server/master_ui/templates.go diff --git a/go/weed/weed_server/raft_server.go b/weed/server/raft_server.go similarity index 98% rename from go/weed/weed_server/raft_server.go rename to weed/server/raft_server.go index bc0414679..a35659818 100644 --- a/go/weed/weed_server/raft_server.go +++ b/weed/server/raft_server.go @@ -17,8 +17,8 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/topology" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/topology" "github.com/gorilla/mux" ) diff --git a/go/weed/weed_server/raft_server_handlers.go b/weed/server/raft_server_handlers.go similarity index 95% rename from go/weed/weed_server/raft_server_handlers.go rename to weed/server/raft_server_handlers.go index b1d964a32..335ba668f 100644 --- a/go/weed/weed_server/raft_server_handlers.go +++ b/weed/server/raft_server_handlers.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" ) // Handles incoming RAFT joins. diff --git a/go/weed/weed_server/volume_server.go b/weed/server/volume_server.go similarity index 96% rename from go/weed/weed_server/volume_server.go rename to weed/server/volume_server.go index 229d66cb9..79a4276b1 100644 --- a/go/weed/weed_server/volume_server.go +++ b/weed/server/volume_server.go @@ -6,9 +6,9 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage" ) type VolumeServer struct { diff --git a/go/weed/weed_server/volume_server_handlers.go b/weed/server/volume_server_handlers.go similarity index 96% rename from go/weed/weed_server/volume_server_handlers.go rename to weed/server/volume_server_handlers.go index accc280cd..2d6fe7849 100644 --- a/go/weed/weed_server/volume_server_handlers.go +++ b/weed/server/volume_server_handlers.go @@ -3,7 +3,7 @@ package weed_server import ( "net/http" - "github.com/chrislusf/seaweedfs/go/stats" + "github.com/chrislusf/seaweedfs/weed/stats" ) /* diff --git a/go/weed/weed_server/volume_server_handlers_admin.go b/weed/server/volume_server_handlers_admin.go similarity index 92% rename from go/weed/weed_server/volume_server_handlers_admin.go rename to weed/server/volume_server_handlers_admin.go index 80aeb3f1d..ae9817ef6 100644 --- a/go/weed/weed_server/volume_server_handlers_admin.go +++ b/weed/server/volume_server_handlers_admin.go @@ -4,9 +4,9 @@ import ( "net/http" "path/filepath" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/stats" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/volume_server_handlers_helper.go b/weed/server/volume_server_handlers_helper.go similarity index 100% rename from go/weed/weed_server/volume_server_handlers_helper.go rename to weed/server/volume_server_handlers_helper.go diff --git a/go/weed/weed_server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go similarity index 97% rename from go/weed/weed_server/volume_server_handlers_read.go rename to weed/server/volume_server_handlers_read.go index 3eb33a8c9..3889afe5c 100644 --- a/go/weed/weed_server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -13,11 +13,11 @@ import ( "net/url" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/images" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/images" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"") diff --git a/go/weed/weed_server/volume_server_handlers_sync.go b/weed/server/volume_server_handlers_sync.go similarity index 95% rename from go/weed/weed_server/volume_server_handlers_sync.go rename to weed/server/volume_server_handlers_sync.go index c52c93bd2..8a2e30743 100644 --- a/go/weed/weed_server/volume_server_handlers_sync.go +++ b/weed/server/volume_server_handlers_sync.go @@ -4,9 +4,9 @@ import ( "fmt" "net/http" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) func (vs *VolumeServer) getVolumeSyncStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/volume_server_handlers_ui.go b/weed/server/volume_server_handlers_ui.go similarity index 82% rename from go/weed/weed_server/volume_server_handlers_ui.go rename to weed/server/volume_server_handlers_ui.go index 5925b5a88..7923c95c0 100644 --- a/go/weed/weed_server/volume_server_handlers_ui.go +++ b/weed/server/volume_server_handlers_ui.go @@ -5,9 +5,9 @@ import ( "path/filepath" "time" - "github.com/chrislusf/seaweedfs/go/stats" - "github.com/chrislusf/seaweedfs/go/util" - ui "github.com/chrislusf/seaweedfs/go/weed/weed_server/volume_server_ui" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" + ui "github.com/chrislusf/seaweedfs/weed/server/volume_server_ui" ) func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/volume_server_handlers_vacuum.go b/weed/server/volume_server_handlers_vacuum.go similarity index 96% rename from go/weed/weed_server/volume_server_handlers_vacuum.go rename to weed/server/volume_server_handlers_vacuum.go index e174835ca..ef348d35c 100644 --- a/go/weed/weed_server/volume_server_handlers_vacuum.go +++ b/weed/server/volume_server_handlers_vacuum.go @@ -3,7 +3,7 @@ package weed_server import ( "net/http" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func (vs *VolumeServer) vacuumVolumeCheckHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/volume_server_handlers_write.go b/weed/server/volume_server_handlers_write.go similarity index 95% rename from go/weed/weed_server/volume_server_handlers_write.go rename to weed/server/volume_server_handlers_write.go index b0a4c7031..e7ca2f8e1 100644 --- a/go/weed/weed_server/volume_server_handlers_write.go +++ b/weed/server/volume_server_handlers_write.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/topology" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/topology" ) func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { diff --git a/go/weed/weed_server/volume_server_ui/templates.go b/weed/server/volume_server_ui/templates.go similarity index 100% rename from go/weed/weed_server/volume_server_ui/templates.go rename to weed/server/volume_server_ui/templates.go diff --git a/go/stats/disk.go b/weed/stats/disk.go similarity index 100% rename from go/stats/disk.go rename to weed/stats/disk.go diff --git a/go/stats/disk_notsupported.go b/weed/stats/disk_notsupported.go similarity index 100% rename from go/stats/disk_notsupported.go rename to weed/stats/disk_notsupported.go diff --git a/go/stats/disk_supported.go b/weed/stats/disk_supported.go similarity index 100% rename from go/stats/disk_supported.go rename to weed/stats/disk_supported.go diff --git a/go/stats/duration_counter.go b/weed/stats/duration_counter.go similarity index 100% rename from go/stats/duration_counter.go rename to weed/stats/duration_counter.go diff --git a/go/stats/duration_counter_test.go b/weed/stats/duration_counter_test.go similarity index 100% rename from go/stats/duration_counter_test.go rename to weed/stats/duration_counter_test.go diff --git a/go/stats/memory.go b/weed/stats/memory.go similarity index 100% rename from go/stats/memory.go rename to weed/stats/memory.go diff --git a/go/stats/memory_notsupported.go b/weed/stats/memory_notsupported.go similarity index 100% rename from go/stats/memory_notsupported.go rename to weed/stats/memory_notsupported.go diff --git a/go/stats/memory_supported.go b/weed/stats/memory_supported.go similarity index 100% rename from go/stats/memory_supported.go rename to weed/stats/memory_supported.go diff --git a/go/stats/stats.go b/weed/stats/stats.go similarity index 100% rename from go/stats/stats.go rename to weed/stats/stats.go diff --git a/go/storage/compact_map.go b/weed/storage/compact_map.go similarity index 100% rename from go/storage/compact_map.go rename to weed/storage/compact_map.go diff --git a/go/storage/compact_map_perf_test.go b/weed/storage/compact_map_perf_test.go similarity index 90% rename from go/storage/compact_map_perf_test.go rename to weed/storage/compact_map_perf_test.go index 1b429f263..cc7669139 100644 --- a/go/storage/compact_map_perf_test.go +++ b/weed/storage/compact_map_perf_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) func TestMemoryUsage(t *testing.T) { diff --git a/go/storage/compact_map_test.go b/weed/storage/compact_map_test.go similarity index 100% rename from go/storage/compact_map_test.go rename to weed/storage/compact_map_test.go diff --git a/go/storage/crc.go b/weed/storage/crc.go similarity index 91% rename from go/storage/crc.go rename to weed/storage/crc.go index 21e384854..494937784 100644 --- a/go/storage/crc.go +++ b/weed/storage/crc.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/klauspost/crc32" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" ) var table = crc32.MakeTable(crc32.Castagnoli) diff --git a/go/storage/disk_location.go b/weed/storage/disk_location.go similarity index 97% rename from go/storage/disk_location.go rename to weed/storage/disk_location.go index 8cca1a68e..cc3c83b63 100644 --- a/go/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "strings" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type DiskLocation struct { diff --git a/go/storage/file_id.go b/weed/storage/file_id.go similarity index 92% rename from go/storage/file_id.go rename to weed/storage/file_id.go index 64b61ba89..4cfdb16fa 100644 --- a/go/storage/file_id.go +++ b/weed/storage/file_id.go @@ -5,8 +5,8 @@ import ( "errors" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type FileId struct { diff --git a/go/storage/needle.go b/weed/storage/needle.go similarity index 97% rename from go/storage/needle.go rename to weed/storage/needle.go index 8ab76c0f3..29549b323 100644 --- a/go/storage/needle.go +++ b/weed/storage/needle.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/images" - "github.com/chrislusf/seaweedfs/go/operation" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/images" + "github.com/chrislusf/seaweedfs/weed/operation" ) const ( diff --git a/go/storage/needle_byte_cache.go b/weed/storage/needle_byte_cache.go similarity index 97% rename from go/storage/needle_byte_cache.go rename to weed/storage/needle_byte_cache.go index 5db0f8895..ae35a48ba 100644 --- a/go/storage/needle_byte_cache.go +++ b/weed/storage/needle_byte_cache.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/golang-lru" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/go/storage/needle_map.go b/weed/storage/needle_map.go similarity index 98% rename from go/storage/needle_map.go rename to weed/storage/needle_map.go index 638a9b4af..05bc6e86c 100644 --- a/go/storage/needle_map.go +++ b/weed/storage/needle_map.go @@ -6,7 +6,7 @@ import ( "os" "sync" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/util" ) type NeedleMapType int diff --git a/go/storage/needle_map_boltdb.go b/weed/storage/needle_map_boltdb.go similarity index 97% rename from go/storage/needle_map_boltdb.go rename to weed/storage/needle_map_boltdb.go index e95c016bb..bd3edf28d 100644 --- a/go/storage/needle_map_boltdb.go +++ b/weed/storage/needle_map_boltdb.go @@ -6,8 +6,8 @@ import ( "github.com/boltdb/bolt" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type BoltDbNeedleMap struct { diff --git a/go/storage/needle_map_leveldb.go b/weed/storage/needle_map_leveldb.go similarity index 97% rename from go/storage/needle_map_leveldb.go rename to weed/storage/needle_map_leveldb.go index 47f63e3ae..1789dbb12 100644 --- a/go/storage/needle_map_leveldb.go +++ b/weed/storage/needle_map_leveldb.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/go/storage/needle_map_memory.go b/weed/storage/needle_map_memory.go similarity index 98% rename from go/storage/needle_map_memory.go rename to weed/storage/needle_map_memory.go index 2b1fc1b54..f2f4835df 100644 --- a/go/storage/needle_map_memory.go +++ b/weed/storage/needle_map_memory.go @@ -4,7 +4,7 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type NeedleMap struct { diff --git a/go/storage/needle_read_write.go b/weed/storage/needle_read_write.go similarity index 98% rename from go/storage/needle_read_write.go rename to weed/storage/needle_read_write.go index fcca2469c..2f26147d6 100644 --- a/go/storage/needle_read_write.go +++ b/weed/storage/needle_read_write.go @@ -6,8 +6,8 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) const ( diff --git a/go/storage/needle_test.go b/weed/storage/needle_test.go similarity index 100% rename from go/storage/needle_test.go rename to weed/storage/needle_test.go diff --git a/go/storage/replica_placement.go b/weed/storage/replica_placement.go similarity index 100% rename from go/storage/replica_placement.go rename to weed/storage/replica_placement.go diff --git a/go/storage/replica_placement_test.go b/weed/storage/replica_placement_test.go similarity index 100% rename from go/storage/replica_placement_test.go rename to weed/storage/replica_placement_test.go diff --git a/go/storage/store.go b/weed/storage/store.go similarity index 98% rename from go/storage/store.go rename to weed/storage/store.go index dd312c075..d44d6a863 100644 --- a/go/storage/store.go +++ b/weed/storage/store.go @@ -8,10 +8,10 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/go/storage/store_vacuum.go b/weed/storage/store_vacuum.go similarity index 97% rename from go/storage/store_vacuum.go rename to weed/storage/store_vacuum.go index 52343c898..03825c159 100644 --- a/go/storage/store_vacuum.go +++ b/weed/storage/store_vacuum.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func (s *Store) CheckCompactVolume(volumeIdString string, garbageThresholdString string) (error, bool) { diff --git a/go/storage/volume.go b/weed/storage/volume.go similarity index 99% rename from go/storage/volume.go rename to weed/storage/volume.go index 7e330a9e4..d40bdc565 100644 --- a/go/storage/volume.go +++ b/weed/storage/volume.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type Volume struct { diff --git a/go/storage/volume_id.go b/weed/storage/volume_id.go similarity index 100% rename from go/storage/volume_id.go rename to weed/storage/volume_id.go diff --git a/go/storage/volume_info.go b/weed/storage/volume_info.go similarity index 96% rename from go/storage/volume_info.go rename to weed/storage/volume_info.go index a2f139c89..b3068eec3 100644 --- a/go/storage/volume_info.go +++ b/weed/storage/volume_info.go @@ -2,7 +2,7 @@ package storage import ( "fmt" - "github.com/chrislusf/seaweedfs/go/operation" + "github.com/chrislusf/seaweedfs/weed/operation" "sort" ) diff --git a/go/storage/volume_info_test.go b/weed/storage/volume_info_test.go similarity index 100% rename from go/storage/volume_info_test.go rename to weed/storage/volume_info_test.go diff --git a/go/storage/volume_super_block.go b/weed/storage/volume_super_block.go similarity index 96% rename from go/storage/volume_super_block.go rename to weed/storage/volume_super_block.go index e37360075..fc773273d 100644 --- a/go/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) const ( diff --git a/go/storage/volume_super_block_test.go b/weed/storage/volume_super_block_test.go similarity index 100% rename from go/storage/volume_super_block_test.go rename to weed/storage/volume_super_block_test.go diff --git a/go/storage/volume_sync.go b/weed/storage/volume_sync.go similarity index 98% rename from go/storage/volume_sync.go rename to weed/storage/volume_sync.go index 2c72d62f0..231ff31c2 100644 --- a/go/storage/volume_sync.go +++ b/weed/storage/volume_sync.go @@ -9,9 +9,9 @@ import ( "sort" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/util" ) // The volume sync with a master volume via 2 steps: diff --git a/go/storage/volume_ttl.go b/weed/storage/volume_ttl.go similarity index 100% rename from go/storage/volume_ttl.go rename to weed/storage/volume_ttl.go diff --git a/go/storage/volume_ttl_test.go b/weed/storage/volume_ttl_test.go similarity index 100% rename from go/storage/volume_ttl_test.go rename to weed/storage/volume_ttl_test.go diff --git a/go/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go similarity index 98% rename from go/storage/volume_vacuum.go rename to weed/storage/volume_vacuum.go index 5ba8d575c..9b9a27816 100644 --- a/go/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -5,7 +5,7 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func (v *Volume) garbageLevel() float64 { diff --git a/go/storage/volume_version.go b/weed/storage/volume_version.go similarity index 100% rename from go/storage/volume_version.go rename to weed/storage/volume_version.go diff --git a/go/tools/read_index.go b/weed/tools/read_index.go similarity index 91% rename from go/tools/read_index.go rename to weed/tools/read_index.go index 1543f4482..642ff786b 100644 --- a/go/tools/read_index.go +++ b/weed/tools/read_index.go @@ -6,7 +6,7 @@ import ( "log" "os" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/storage" ) var ( diff --git a/go/topology/allocate_volume.go b/weed/topology/allocate_volume.go similarity index 89% rename from go/topology/allocate_volume.go rename to weed/topology/allocate_volume.go index f014c3527..7b267a805 100644 --- a/go/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -6,8 +6,8 @@ import ( "fmt" "net/url" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) type AllocateVolumeResult struct { diff --git a/go/topology/cluster_commands.go b/weed/topology/cluster_commands.go similarity index 87% rename from go/topology/cluster_commands.go rename to weed/topology/cluster_commands.go index eac93c13c..53f45ec4d 100644 --- a/go/topology/cluster_commands.go +++ b/weed/topology/cluster_commands.go @@ -2,8 +2,8 @@ package topology import ( "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) type MaxVolumeIdCommand struct { diff --git a/go/topology/collection.go b/weed/topology/collection.go similarity index 93% rename from go/topology/collection.go rename to weed/topology/collection.go index 6368900c3..a17f0c961 100644 --- a/go/topology/collection.go +++ b/weed/topology/collection.go @@ -3,8 +3,8 @@ package topology import ( "fmt" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) type Collection struct { diff --git a/go/topology/configuration.go b/weed/topology/configuration.go similarity index 100% rename from go/topology/configuration.go rename to weed/topology/configuration.go diff --git a/go/topology/configuration_test.go b/weed/topology/configuration_test.go similarity index 100% rename from go/topology/configuration_test.go rename to weed/topology/configuration_test.go diff --git a/go/topology/data_center.go b/weed/topology/data_center.go similarity index 100% rename from go/topology/data_center.go rename to weed/topology/data_center.go diff --git a/go/topology/data_node.go b/weed/topology/data_node.go similarity index 96% rename from go/topology/data_node.go rename to weed/topology/data_node.go index 3bad8c188..1404d4aa8 100644 --- a/go/topology/data_node.go +++ b/weed/topology/data_node.go @@ -4,8 +4,8 @@ import ( "fmt" "strconv" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) type DataNode struct { diff --git a/go/topology/node.go b/weed/topology/node.go similarity index 98% rename from go/topology/node.go rename to weed/topology/node.go index 6a84b4b92..4ce35f4b0 100644 --- a/go/topology/node.go +++ b/weed/topology/node.go @@ -6,8 +6,8 @@ import ( "strings" "sync" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) type NodeId string diff --git a/go/topology/rack.go b/weed/topology/rack.go similarity index 100% rename from go/topology/rack.go rename to weed/topology/rack.go diff --git a/go/topology/store_replicate.go b/weed/topology/store_replicate.go similarity index 94% rename from go/topology/store_replicate.go rename to weed/topology/store_replicate.go index f67ea7732..be5777167 100644 --- a/go/topology/store_replicate.go +++ b/weed/topology/store_replicate.go @@ -10,11 +10,11 @@ import ( "net/url" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/security" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) func ReplicatedWrite(masterNode string, s *storage.Store, diff --git a/go/topology/topo_test.go b/weed/topology/topo_test.go similarity index 100% rename from go/topology/topo_test.go rename to weed/topology/topo_test.go diff --git a/go/topology/topology.go b/weed/topology/topology.go similarity index 95% rename from go/topology/topology.go rename to weed/topology/topology.go index 088639eef..04b500053 100644 --- a/go/topology/topology.go +++ b/weed/topology/topology.go @@ -6,11 +6,11 @@ import ( "math/rand" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/operation" - "github.com/chrislusf/seaweedfs/go/sequence" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) type Topology struct { diff --git a/go/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go similarity index 95% rename from go/topology/topology_event_handling.go rename to weed/topology/topology_event_handling.go index 8a3cc5a89..737b94482 100644 --- a/go/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) func (t *Topology) StartRefreshWritableVolumes(garbageThreshold string) { diff --git a/go/topology/topology_map.go b/weed/topology/topology_map.go similarity index 100% rename from go/topology/topology_map.go rename to weed/topology/topology_map.go diff --git a/go/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go similarity index 97% rename from go/topology/topology_vacuum.go rename to weed/topology/topology_vacuum.go index eeb4fef69..8cf8dfbeb 100644 --- a/go/topology/topology_vacuum.go +++ b/weed/topology/topology_vacuum.go @@ -6,9 +6,9 @@ import ( "net/url" "time" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" - "github.com/chrislusf/seaweedfs/go/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" ) func batchVacuumVolumeCheck(vl *VolumeLayout, vid storage.VolumeId, locationlist *VolumeLocationList, garbageThreshold string) bool { diff --git a/go/topology/volume_growth.go b/weed/topology/volume_growth.go similarity index 98% rename from go/topology/volume_growth.go rename to weed/topology/volume_growth.go index a25ba116b..3a1c9c567 100644 --- a/go/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -5,8 +5,8 @@ import ( "math/rand" "sync" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) /* diff --git a/go/topology/volume_growth_test.go b/weed/topology/volume_growth_test.go similarity index 97% rename from go/topology/volume_growth_test.go rename to weed/topology/volume_growth_test.go index 15abfcc73..e5716674a 100644 --- a/go/topology/volume_growth_test.go +++ b/weed/topology/volume_growth_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/chrislusf/seaweedfs/go/sequence" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/storage" ) var topologyLayout = ` diff --git a/go/topology/volume_layout.go b/weed/topology/volume_layout.go similarity index 98% rename from go/topology/volume_layout.go rename to weed/topology/volume_layout.go index 7b6c0f117..e500de583 100644 --- a/go/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -6,8 +6,8 @@ import ( "math/rand" "sync" - "github.com/chrislusf/seaweedfs/go/glog" - "github.com/chrislusf/seaweedfs/go/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) // mapping from volume to its locations, inverted from server to volume diff --git a/go/topology/volume_location_list.go b/weed/topology/volume_location_list.go similarity index 100% rename from go/topology/volume_location_list.go rename to weed/topology/volume_location_list.go diff --git a/go/util/bytes.go b/weed/util/bytes.go similarity index 100% rename from go/util/bytes.go rename to weed/util/bytes.go diff --git a/go/util/bytes_pool.go b/weed/util/bytes_pool.go similarity index 100% rename from go/util/bytes_pool.go rename to weed/util/bytes_pool.go diff --git a/go/util/bytes_pool_test.go b/weed/util/bytes_pool_test.go similarity index 100% rename from go/util/bytes_pool_test.go rename to weed/util/bytes_pool_test.go diff --git a/go/util/concurrent_read_map.go b/weed/util/concurrent_read_map.go similarity index 100% rename from go/util/concurrent_read_map.go rename to weed/util/concurrent_read_map.go diff --git a/go/util/config.go b/weed/util/config.go similarity index 98% rename from go/util/config.go rename to weed/util/config.go index 7e9471b8a..e4549c322 100644 --- a/go/util/config.go +++ b/weed/util/config.go @@ -14,7 +14,7 @@ import ( "encoding/json" "os" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type Config struct { diff --git a/go/util/constants.go b/weed/util/constants.go similarity index 100% rename from go/util/constants.go rename to weed/util/constants.go diff --git a/go/util/file_util.go b/weed/util/file_util.go similarity index 93% rename from go/util/file_util.go rename to weed/util/file_util.go index 37133b5b2..a39fb0860 100644 --- a/go/util/file_util.go +++ b/weed/util/file_util.go @@ -5,7 +5,7 @@ import ( "errors" "os" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func TestFolderWritable(folder string) (err error) { diff --git a/go/util/http_util.go b/weed/util/http_util.go similarity index 98% rename from go/util/http_util.go rename to weed/util/http_util.go index 29b2043ee..a54fc8779 100644 --- a/go/util/http_util.go +++ b/weed/util/http_util.go @@ -11,7 +11,7 @@ import ( "net/url" "strings" - "github.com/chrislusf/seaweedfs/go/security" + "github.com/chrislusf/seaweedfs/weed/security" ) var ( diff --git a/go/util/net_timeout.go b/weed/util/net_timeout.go similarity index 97% rename from go/util/net_timeout.go rename to weed/util/net_timeout.go index ad8396e18..f46776992 100644 --- a/go/util/net_timeout.go +++ b/weed/util/net_timeout.go @@ -4,7 +4,7 @@ import ( "net" "time" - "github.com/chrislusf/seaweedfs/go/stats" + "github.com/chrislusf/seaweedfs/weed/stats" ) // Listener wraps a net.Listener, and gives a place to store the timeout diff --git a/go/util/parse.go b/weed/util/parse.go similarity index 100% rename from go/util/parse.go rename to weed/util/parse.go diff --git a/go/weed/weed.go b/weed/weed.go similarity index 93% rename from go/weed/weed.go rename to weed/weed.go index 49fe17eaa..c18eac013 100644 --- a/go/weed/weed.go +++ b/weed/weed.go @@ -13,28 +13,14 @@ import ( "unicode" "unicode/utf8" - "github.com/chrislusf/seaweedfs/go/glog" + "github.com/chrislusf/seaweedfs/weed/command" + "github.com/chrislusf/seaweedfs/weed/glog" ) var IsDebug *bool var server *string -var commands = []*Command{ - cmdBenchmark, - cmdBackup, - cmdCompact, - cmdFix, - cmdServer, - cmdMaster, - cmdFiler, - cmdUpload, - cmdDownload, - cmdShell, - cmdVersion, - cmdVolume, - cmdExport, - cmdMount, -} +var commands = command.Commands var exitStatus = 0 var exitMu sync.Mutex