diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 400c7d56..59762d02 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: run: env CGO_ENABLED=0 GOOS=windows go build -o geesefs-win-x64.exe -v - name: Build tests - run: go test -c github.com/yandex-cloud/geesefs/internal -o geesefs-tests-linux-amd64 + run: go test -c github.com/yandex-cloud/geesefs/core -o geesefs-tests-linux-amd64 - name: Publish to S3 run: | diff --git a/Makefile b/Makefile index 09cd8da3..6735da63 100644 --- a/Makefile +++ b/Makefile @@ -25,4 +25,4 @@ install: .PHONY: protoc protoc: - protoc --go_out=. --experimental_allow_proto3_optional --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative internal/pb/*.proto \ No newline at end of file + protoc --go_out=. --experimental_allow_proto3_optional --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative core/pb/*.proto \ No newline at end of file diff --git a/internal/aws_test.go b/core/aws_test.go similarity index 98% rename from internal/aws_test.go rename to core/aws_test.go index 197480e9..bd57a0a7 100644 --- a/internal/aws_test.go +++ b/core/aws_test.go @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" . "gopkg.in/check.v1" "fmt" diff --git a/internal/backend.go b/core/backend.go similarity index 99% rename from internal/backend.go rename to core/backend.go index c0fcd6dd..fe711502 100644 --- a/internal/backend.go +++ b/core/backend.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "fmt" diff --git a/internal/backend_adlv1.go b/core/backend_adlv1.go similarity index 99% rename from internal/backend_adlv1.go rename to core/backend_adlv1.go index be2d6a41..58e1bc77 100644 --- a/internal/backend_adlv1.go +++ b/core/backend_adlv1.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "bytes" "context" diff --git a/internal/backend_adlv2.go b/core/backend_adlv2.go similarity index 99% rename from internal/backend_adlv2.go rename to core/backend_adlv2.go index 3133f599..7e45c308 100644 --- a/internal/backend_adlv2.go +++ b/core/backend_adlv2.go @@ -14,10 +14,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "context" "encoding/base64" diff --git a/internal/backend_azblob.go b/core/backend_azblob.go similarity index 99% rename from internal/backend_azblob.go rename to core/backend_azblob.go index 1fc3d85a..02552b9c 100644 --- a/internal/backend_azblob.go +++ b/core/backend_azblob.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "bytes" "context" diff --git a/internal/backend_gcs3.go b/core/backend_gcs3.go similarity index 98% rename from internal/backend_gcs3.go rename to core/backend_gcs3.go index 08f3db85..7cf35f6f 100644 --- a/internal/backend_gcs3.go +++ b/core/backend_gcs3.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "context" "os" diff --git a/internal/backend_s3.go b/core/backend_s3.go similarity index 99% rename from internal/backend_s3.go rename to core/backend_s3.go index 1aeb748e..cf47c576 100644 --- a/internal/backend_s3.go +++ b/core/backend_s3.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "golang.org/x/sync/errgroup" "encoding/json" diff --git a/internal/backend_test.go b/core/backend_test.go similarity index 99% rename from internal/backend_test.go rename to core/backend_test.go index 7807f8cf..80b38827 100644 --- a/internal/backend_test.go +++ b/core/backend_test.go @@ -14,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core type TestBackend struct { StorageBackend diff --git a/internal/buffer_list.go b/core/buffer_list.go similarity index 99% rename from internal/buffer_list.go rename to core/buffer_list.go index dece9fa5..c365e707 100644 --- a/internal/buffer_list.go +++ b/core/buffer_list.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "errors" diff --git a/internal/buffer_list_test.go b/core/buffer_list_test.go similarity index 99% rename from internal/buffer_list_test.go rename to core/buffer_list_test.go index 12e6d18b..3d4dc763 100644 --- a/internal/buffer_list_test.go +++ b/core/buffer_list_test.go @@ -1,4 +1,4 @@ -package internal +package core import ( . "gopkg.in/check.v1" diff --git a/internal/buffer_pool.go b/core/buffer_pool.go similarity index 98% rename from internal/buffer_pool.go rename to core/buffer_pool.go index bff20846..31c86fda 100644 --- a/internal/buffer_pool.go +++ b/core/buffer_pool.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "runtime" "runtime/debug" "sync" diff --git a/internal/buffer_pool_test.go b/core/buffer_pool_test.go similarity index 99% rename from internal/buffer_pool_test.go rename to core/buffer_pool_test.go index 53647b64..947ecdf1 100644 --- a/internal/buffer_pool_test.go +++ b/core/buffer_pool_test.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "bytes" diff --git a/internal/buffer_queue.go b/core/buffer_queue.go similarity index 99% rename from internal/buffer_queue.go rename to core/buffer_queue.go index e6ecb79d..4381b16f 100644 --- a/internal/buffer_queue.go +++ b/core/buffer_queue.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "sync" diff --git a/internal/buffer_reader.go b/core/buffer_reader.go similarity index 99% rename from internal/buffer_reader.go rename to core/buffer_reader.go index ffbfda60..2d6602b2 100644 --- a/internal/buffer_reader.go +++ b/core/buffer_reader.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "io" diff --git a/internal/cfg/conf_azure.go b/core/cfg/conf_azure.go similarity index 100% rename from internal/cfg/conf_azure.go rename to core/cfg/conf_azure.go diff --git a/internal/cfg/conf_s3.go b/core/cfg/conf_s3.go similarity index 100% rename from internal/cfg/conf_s3.go rename to core/cfg/conf_s3.go diff --git a/internal/cfg/config.go b/core/cfg/config.go similarity index 100% rename from internal/cfg/config.go rename to core/cfg/config.go diff --git a/internal/cfg/dup_default.go b/core/cfg/dup_default.go similarity index 100% rename from internal/cfg/dup_default.go rename to core/cfg/dup_default.go diff --git a/internal/cfg/dup_linux_arm64.go b/core/cfg/dup_linux_arm64.go similarity index 100% rename from internal/cfg/dup_linux_arm64.go rename to core/cfg/dup_linux_arm64.go diff --git a/internal/cfg/dup_windows.go b/core/cfg/dup_windows.go similarity index 100% rename from internal/cfg/dup_windows.go rename to core/cfg/dup_windows.go diff --git a/internal/cfg/flags.go b/core/cfg/flags.go similarity index 100% rename from internal/cfg/flags.go rename to core/cfg/flags.go diff --git a/internal/cfg/logger.go b/core/cfg/logger.go similarity index 100% rename from internal/cfg/logger.go rename to core/cfg/logger.go diff --git a/internal/cfg/logger_nowindows.go b/core/cfg/logger_nowindows.go similarity index 100% rename from internal/cfg/logger_nowindows.go rename to core/cfg/logger_nowindows.go diff --git a/internal/cfg/logger_windows.go b/core/cfg/logger_windows.go similarity index 100% rename from internal/cfg/logger_windows.go rename to core/cfg/logger_windows.go diff --git a/internal/cfg/perms.go b/core/cfg/perms.go similarity index 100% rename from internal/cfg/perms.go rename to core/cfg/perms.go diff --git a/internal/cgroup.go b/core/cgroup.go similarity index 99% rename from internal/cgroup.go rename to core/cgroup.go index 686cc58f..eec8d5b0 100644 --- a/internal/cgroup.go +++ b/core/cgroup.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "errors" diff --git a/internal/cluster_conn_pool.go b/core/cluster_conn_pool.go similarity index 97% rename from internal/cluster_conn_pool.go rename to core/cluster_conn_pool.go index 506f6a46..d360a17b 100644 --- a/internal/cluster_conn_pool.go +++ b/core/cluster_conn_pool.go @@ -1,6 +1,6 @@ // +build !windows -package internal +package core import ( "context" @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "google.golang.org/grpc" "google.golang.org/grpc/metadata" diff --git a/internal/cluster_fs.go b/core/cluster_fs.go similarity index 99% rename from internal/cluster_fs.go rename to core/cluster_fs.go index 1791d8e9..096699eb 100644 --- a/internal/cluster_fs.go +++ b/core/cluster_fs.go @@ -1,6 +1,6 @@ // +build !windows -package internal +package core import ( "context" @@ -13,8 +13,8 @@ import ( "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core/pb" "google.golang.org/grpc" ) diff --git a/internal/cluster_fs_fuse.go b/core/cluster_fs_fuse.go similarity index 99% rename from internal/cluster_fs_fuse.go rename to core/cluster_fs_fuse.go index c25febb0..323fffaa 100644 --- a/internal/cluster_fs_fuse.go +++ b/core/cluster_fs_fuse.go @@ -1,6 +1,6 @@ // +build !windows -package internal +package core import ( "context" @@ -9,11 +9,11 @@ import ( "syscall" "sync/atomic" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/fuseops" "github.com/jacobsa/fuse/fuseutil" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/pb" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/internal/cluster_fs_grpc.go b/core/cluster_fs_grpc.go similarity index 99% rename from internal/cluster_fs_grpc.go rename to core/cluster_fs_grpc.go index 56bc673b..25f0066f 100644 --- a/internal/cluster_fs_grpc.go +++ b/core/cluster_fs_grpc.go @@ -1,6 +1,6 @@ // +build !windows -package internal +package core import ( "context" @@ -10,7 +10,7 @@ import ( "time" "github.com/jacobsa/fuse/fuseops" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/pb" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/internal/cluster_grpc_server.go b/core/cluster_grpc_server.go similarity index 96% rename from internal/cluster_grpc_server.go rename to core/cluster_grpc_server.go index d31fe99b..dfae80c0 100644 --- a/internal/cluster_grpc_server.go +++ b/core/cluster_grpc_server.go @@ -1,13 +1,13 @@ // +build !windows -package internal +package core import ( "context" "net" - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core/pb" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/grpc/reflection" diff --git a/internal/cluster_inode.go b/core/cluster_inode.go similarity index 96% rename from internal/cluster_inode.go rename to core/cluster_inode.go index 0b80182e..7e6ead26 100644 --- a/internal/cluster_inode.go +++ b/core/cluster_inode.go @@ -1,12 +1,12 @@ // +build !windows -package internal +package core import ( "fmt" "io/fs" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/pb" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/internal/cluster_recovery.go b/core/cluster_recovery.go similarity index 75% rename from internal/cluster_recovery.go rename to core/cluster_recovery.go index 742a1c88..cb2536e5 100644 --- a/internal/cluster_recovery.go +++ b/core/cluster_recovery.go @@ -1,12 +1,12 @@ // +build !windows -package internal +package core import ( "context" - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal/pb" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core/pb" ) var recLog = cfg.GetLogger("rec") diff --git a/internal/dir.go b/core/dir.go similarity index 99% rename from internal/dir.go rename to core/dir.go index 5f102c5e..25f3f118 100644 --- a/internal/dir.go +++ b/core/dir.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "fmt" @@ -27,7 +27,7 @@ import ( "github.com/jacobsa/fuse/fuseops" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" ) type SlurpGap struct { diff --git a/internal/dir_test.go b/core/dir_test.go similarity index 98% rename from internal/dir_test.go rename to core/dir_test.go index 80d5fb81..8409e1e2 100644 --- a/internal/dir_test.go +++ b/core/dir_test.go @@ -1,9 +1,9 @@ -package internal +package core import ( . "gopkg.in/check.v1" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" ) type DirTest struct{} diff --git a/internal/fd_queue.go b/core/fd_queue.go similarity index 99% rename from internal/fd_queue.go rename to core/fd_queue.go index 2e823ed5..eeaf55b7 100644 --- a/internal/fd_queue.go +++ b/core/fd_queue.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "sync" diff --git a/internal/file.go b/core/file.go similarity index 99% rename from internal/file.go rename to core/file.go index 553ad0cc..35c809c6 100644 --- a/internal/file.go +++ b/core/file.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "fmt" diff --git a/internal/goofys.go b/core/goofys.go similarity index 99% rename from internal/goofys.go rename to core/goofys.go index 26f9e201..6b0cf3d6 100644 --- a/internal/goofys.go +++ b/core/goofys.go @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "context" "fmt" diff --git a/internal/goofys_common_test.go b/core/goofys_common_test.go similarity index 99% rename from internal/goofys_common_test.go rename to core/goofys_common_test.go index a938533e..6f5efa93 100644 --- a/internal/goofys_common_test.go +++ b/core/goofys_common_test.go @@ -15,10 +15,10 @@ // Common test initialization routines -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "bufio" "bytes" diff --git a/internal/goofys_fs_test.go b/core/goofys_fs_test.go similarity index 99% rename from internal/goofys_fs_test.go rename to core/goofys_fs_test.go index d5425b14..9428b6e8 100644 --- a/internal/goofys_fs_test.go +++ b/core/goofys_fs_test.go @@ -15,7 +15,7 @@ // Tests for a mounted UNIX or Windows FS - suitable for both -package internal +package core import ( "bytes" @@ -32,7 +32,7 @@ import ( . "gopkg.in/check.v1" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" ) func (s *GoofysTest) mount(t *C, mountPoint string) { diff --git a/internal/goofys_fuse.go b/core/goofys_fuse.go similarity index 99% rename from internal/goofys_fuse.go rename to core/goofys_fuse.go index 11b2c0fb..d575aef2 100644 --- a/internal/goofys_fuse.go +++ b/core/goofys_fuse.go @@ -15,10 +15,10 @@ // +build !windows -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "context" "fmt" diff --git a/internal/goofys_test.go b/core/goofys_test.go similarity index 99% rename from internal/goofys_test.go rename to core/goofys_test.go index 6380497c..d5285204 100644 --- a/internal/goofys_test.go +++ b/core/goofys_test.go @@ -27,7 +27,7 @@ USAGE: [ EMULATOR=1 ] \ [ EVENTUAL_CONSISTENCY=1 ] \ CLOUD=s3|gcs|azblob|adlv1|adlv2 \ - go test -v github.com/yandex-cloud/geesefs/internal \ + go test -v github.com/yandex-cloud/geesefs/core \ [ -check.f TestName ] NOTES: @@ -37,10 +37,10 @@ NOTES: */ -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "bytes" "fmt" diff --git a/internal/goofys_unix_test.go b/core/goofys_unix_test.go similarity index 99% rename from internal/goofys_unix_test.go rename to core/goofys_unix_test.go index 2a69f2de..d7ade8f7 100644 --- a/internal/goofys_unix_test.go +++ b/core/goofys_unix_test.go @@ -17,10 +17,10 @@ // +build !windows -package internal +package core import ( - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" "bytes" "context" diff --git a/internal/goofys_windows.go b/core/goofys_windows.go similarity index 99% rename from internal/goofys_windows.go rename to core/goofys_windows.go index d6ddc073..4b5f6ed6 100644 --- a/internal/goofys_windows.go +++ b/core/goofys_windows.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "context" @@ -27,7 +27,7 @@ import ( "github.com/jacobsa/fuse/fuseops" "github.com/sirupsen/logrus" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" ) // winfsp/cgofuse interface to the file system diff --git a/internal/goofys_windows_test.go b/core/goofys_windows_test.go similarity index 98% rename from internal/goofys_windows_test.go rename to core/goofys_windows_test.go index 12c2b043..7ac2c4be 100644 --- a/internal/goofys_windows_test.go +++ b/core/goofys_windows_test.go @@ -17,7 +17,7 @@ // +build windows -package internal +package core import ( "errors" diff --git a/internal/handles.go b/core/handles.go similarity index 99% rename from internal/handles.go rename to core/handles.go index bbc097f1..477fdd4b 100644 --- a/internal/handles.go +++ b/core/handles.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "bytes" @@ -34,7 +34,7 @@ import ( "github.com/sirupsen/logrus" - "github.com/yandex-cloud/geesefs/internal/cfg" + "github.com/yandex-cloud/geesefs/core/cfg" ) const ( diff --git a/internal/internal_test.go b/core/internal_test.go similarity index 92% rename from internal/internal_test.go rename to core/internal_test.go index 0463c92b..c36a29a9 100644 --- a/internal/internal_test.go +++ b/core/internal_test.go @@ -1,7 +1,7 @@ // Just a check.v1 wrapper to allow running selected tests with: // go test -v internal_test.go lfru_btree_test.go lfru_btree.go -package internal +package core import ( "testing" diff --git a/internal/pb/fs_grpc.pb.go b/core/pb/fs_grpc.pb.go similarity index 99% rename from internal/pb/fs_grpc.pb.go rename to core/pb/fs_grpc.pb.go index 53ef813a..ee4337f5 100644 --- a/internal/pb/fs_grpc.pb.go +++ b/core/pb/fs_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.12.4 -// source: internal/pb/fs_grpc.proto +// source: core/pb/fs_grpc.proto package pb diff --git a/internal/pb/fs_grpc.proto b/core/pb/fs_grpc.proto similarity index 98% rename from internal/pb/fs_grpc.proto rename to core/pb/fs_grpc.proto index ca09a045..90f3758a 100644 --- a/internal/pb/fs_grpc.proto +++ b/core/pb/fs_grpc.proto @@ -2,7 +2,7 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/yandex-cloud/geesefs/internal/pb"; +option go_package = "github.com/yandex-cloud/geesefs/core/pb"; service FsGrpc { // stealing diff --git a/internal/pb/fs_grpc_grpc.pb.go b/core/pb/fs_grpc_grpc.pb.go similarity index 99% rename from internal/pb/fs_grpc_grpc.pb.go rename to core/pb/fs_grpc_grpc.pb.go index 8d2b7f92..914c7634 100644 --- a/internal/pb/fs_grpc_grpc.pb.go +++ b/core/pb/fs_grpc_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 -// source: internal/pb/fs_grpc.proto +// source: core/pb/fs_grpc.proto package pb @@ -818,5 +818,5 @@ var FsGrpc_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "internal/pb/fs_grpc.proto", + Metadata: "core/pb/fs_grpc.proto", } diff --git a/internal/pb/recovery.pb.go b/core/pb/recovery.pb.go similarity index 99% rename from internal/pb/recovery.pb.go rename to core/pb/recovery.pb.go index be1b8083..8562aa2b 100644 --- a/internal/pb/recovery.pb.go +++ b/core/pb/recovery.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.12.4 -// source: internal/pb/recovery.proto +// source: core/pb/recovery.proto package pb diff --git a/internal/pb/recovery.proto b/core/pb/recovery.proto similarity index 70% rename from internal/pb/recovery.proto rename to core/pb/recovery.proto index d8f6b697..e7329181 100644 --- a/internal/pb/recovery.proto +++ b/core/pb/recovery.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/yandex-cloud/geesefs/internal/pb"; +option go_package = "github.com/yandex-cloud/geesefs/core/pb"; service Recovery { rpc Unmount(UnmountRequest) returns (UnmountResponse); diff --git a/internal/pb/recovery_grpc.pb.go b/core/pb/recovery_grpc.pb.go similarity index 97% rename from internal/pb/recovery_grpc.pb.go rename to core/pb/recovery_grpc.pb.go index 1172562e..507b6f66 100644 --- a/internal/pb/recovery_grpc.pb.go +++ b/core/pb/recovery_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.12.4 -// source: internal/pb/recovery.proto +// source: core/pb/recovery.proto package pb @@ -105,5 +105,5 @@ var Recovery_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "internal/pb/recovery.proto", + Metadata: "core/pb/recovery.proto", } diff --git a/internal/utils.go b/core/utils.go similarity index 99% rename from internal/utils.go rename to core/utils.go index e61a0308..9229909f 100644 --- a/internal/utils.go +++ b/core/utils.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "fmt" diff --git a/internal/utils_linux.go b/core/utils_linux.go similarity index 97% rename from internal/utils_linux.go rename to core/utils_linux.go index bc423566..df90c369 100644 --- a/internal/utils_linux.go +++ b/core/utils_linux.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "golang.org/x/sys/unix" diff --git a/internal/utils_unix.go b/core/utils_unix.go similarity index 97% rename from internal/utils_unix.go rename to core/utils_unix.go index 6b9bb61e..ceec105b 100644 --- a/internal/utils_unix.go +++ b/core/utils_unix.go @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "golang.org/x/sys/unix" diff --git a/internal/utils_windows.go b/core/utils_windows.go similarity index 97% rename from internal/utils_windows.go rename to core/utils_windows.go index 280c2d73..6cbe64d8 100644 --- a/internal/utils_windows.go +++ b/core/utils_windows.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "syscall" diff --git a/internal/v2signer.go b/core/v2signer.go similarity index 99% rename from internal/v2signer.go rename to core/v2signer.go index c8321463..59ddb95f 100644 --- a/internal/v2signer.go +++ b/core/v2signer.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package core import ( "crypto/hmac" diff --git a/main.go b/main.go index b1f332d6..e97944f1 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,8 @@ package main import ( - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core" "fmt" "os" @@ -35,7 +35,7 @@ import ( var log = cfg.GetLogger("main") -func registerSIGINTHandler(fs *internal.Goofys, mfs internal.MountedFS, flags *cfg.FlagStorage) { +func registerSIGINTHandler(fs *core.Goofys, mfs core.MountedFS, flags *cfg.FlagStorage) { // Register for SIGINT. signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, signalsToHandle...) diff --git a/main_nowindows.go b/main_nowindows.go index ca48a8ae..f5f682a1 100644 --- a/main_nowindows.go +++ b/main_nowindows.go @@ -29,8 +29,8 @@ import ( "github.com/kardianos/osext" daemon "github.com/sevlyar/go-daemon" - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core" ) var signalsToHandle = []os.Signal{ os.Interrupt, syscall.SIGTERM, syscall.SIGUSR1 } @@ -128,11 +128,11 @@ func (p *Daemonizer) NotifySuccess(success bool) { func mount( ctx context.Context, bucketName string, - flags *cfg.FlagStorage) (fs *internal.Goofys, mfs internal.MountedFS, err error) { + flags *cfg.FlagStorage) (fs *core.Goofys, mfs core.MountedFS, err error) { if flags.ClusterMode { - return internal.MountCluster(ctx, bucketName, flags) + return core.MountCluster(ctx, bucketName, flags) } else { - return internal.MountFuse(ctx, bucketName, flags) + return core.MountFuse(ctx, bucketName, flags) } } diff --git a/main_windows.go b/main_windows.go index 5817e9f7..169843b3 100644 --- a/main_windows.go +++ b/main_windows.go @@ -19,8 +19,8 @@ import ( "os" "syscall" - "github.com/yandex-cloud/geesefs/internal/cfg" - "github.com/yandex-cloud/geesefs/internal" + "github.com/yandex-cloud/geesefs/core/cfg" + "github.com/yandex-cloud/geesefs/core" ) var signalsToHandle = []os.Signal{ os.Interrupt, syscall.SIGTERM } @@ -57,8 +57,8 @@ func (p *Daemonizer) NotifySuccess(success bool) { func mount( ctx context.Context, bucketName string, - flags *cfg.FlagStorage) (fs *internal.Goofys, mfs internal.MountedFS, err error) { - return internal.MountWin(ctx, bucketName, flags) + flags *cfg.FlagStorage) (fs *core.Goofys, mfs core.MountedFS, err error) { + return core.MountWin(ctx, bucketName, flags) } func messagePath() { diff --git a/test/run-tests.sh b/test/run-tests.sh index 5bb41e26..e8b77804 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -11,6 +11,6 @@ fi . `dirname $0`/run-proxy.sh # run test in `go test` local mode so streaming output works -cd internal +cd core go test -v -timeout $TIMEOUT -check.vv $T exit $?