Move to frostfs-node

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
Pavel Karpy 2022-12-23 20:35:35 +03:00 committed by Stanislav Bogatyrev
parent 42554a9298
commit 923f84722a
934 changed files with 3470 additions and 3451 deletions

View file

@ -1,8 +1,8 @@
package control
import (
"github.com/nspcc-dev/neofs-api-go/v2/rpc/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
type requestWrapper struct {

View file

@ -1,8 +1,8 @@
package control
import (
"github.com/nspcc-dev/neofs-api-go/v2/rpc/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
type requestWrapper struct {

View file

@ -1,8 +1,8 @@
package control
import (
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/common"
)
const serviceName = "ircontrol.ControlService"

View file

@ -3,7 +3,7 @@ package control
import (
"context"
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -1,6 +1,6 @@
package control
import control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
import control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
// HealthChecker is component interface for calculating
// the current health status of a node.

View file

@ -6,10 +6,10 @@ import (
"errors"
"fmt"
"github.com/nspcc-dev/neofs-api-go/v2/refs"
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto"
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
)
// SignedMessage is an interface of Control service message.
@ -56,7 +56,7 @@ func (s *Server) isValidRequest(req SignedMessage) error {
sigV2.SetSign(sign.GetSign())
sigV2.SetScheme(refs.ECDSA_SHA512)
var sig neofscrypto.Signature
var sig frostfscrypto.Signature
if err := sig.ReadFromV2(sigV2); err != nil {
return fmt.Errorf("can't read signature: %w", err)
}
@ -76,9 +76,9 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error {
return fmt.Errorf("marshal request body: %w", err)
}
var sig neofscrypto.Signature
var sig frostfscrypto.Signature
err = sig.Calculate(neofsecdsa.Signer(*key), binBody)
err = sig.Calculate(frostfsecdsa.Signer(*key), binBody)
if err != nil {
return fmt.Errorf("calculate signature: %w", err)
}

View file

@ -7,10 +7,11 @@
package control
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (

View file

@ -4,7 +4,7 @@ package ircontrol;
import "pkg/services/control/ir/types.proto";
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/ir/control";
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/ir/control";
// `ControlService` provides an interface for internal work with the Inner Ring node.
service ControlService {

View file

@ -8,6 +8,7 @@ package control
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"

View file

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package control
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
// StableSize returns the size of x in protobuf format.
//

View file

@ -3,7 +3,7 @@ package control_test
import (
"testing"
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
)

View file

@ -7,10 +7,11 @@
package control
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (

View file

@ -2,7 +2,7 @@ syntax = "proto3";
package ircontrol;
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/ir/control";
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/ir/control";
// Signature of some message.
message Signature {

View file

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package control
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
// StableSize returns the size of x in protobuf format.
//

View file

@ -1,8 +1,8 @@
package control
import (
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/common"
)
const serviceName = "control.ControlService"

View file

@ -3,8 +3,8 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -7,14 +7,14 @@ import (
"errors"
"fmt"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
"github.com/TrueCloudLab/frostfs-node/pkg/services/replicator"
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
objectSDK "github.com/TrueCloudLab/frostfs-sdk-go/object"
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
"github.com/nspcc-dev/neofs-node/pkg/services/replicator"
"github.com/nspcc-dev/neofs-sdk-go/netmap"
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -3,8 +3,8 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -4,9 +4,9 @@ import (
"context"
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -3,7 +3,7 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -1,6 +1,6 @@
package control
import "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
import "github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
func (s *Server) getShardIDList(raw [][]byte) []*shard.ID {
if len(raw) != 0 {

View file

@ -3,9 +3,9 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -3,8 +3,8 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -3,11 +3,11 @@ package control
import (
"crypto/ecdsa"
"github.com/nspcc-dev/neofs-node/pkg/core/container"
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/nspcc-dev/neofs-node/pkg/services/replicator"
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
"github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/services/replicator"
)
// Server is an entity that serves

View file

@ -3,7 +3,7 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -4,8 +4,8 @@ import (
"context"
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -6,10 +6,10 @@ import (
"errors"
"fmt"
"github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto"
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
)
// SignedMessage is an interface of Control service message.
@ -56,7 +56,7 @@ func (s *Server) isValidRequest(req SignedMessage) error {
sigV2.SetSign(sign.GetSign())
sigV2.SetScheme(refs.ECDSA_SHA512)
var sig neofscrypto.Signature
var sig frostfscrypto.Signature
if err := sig.ReadFromV2(sigV2); err != nil {
return fmt.Errorf("can't read signature: %w", err)
}
@ -76,9 +76,9 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error {
return fmt.Errorf("marshal request body: %w", err)
}
var sig neofscrypto.Signature
var sig frostfscrypto.Signature
err = sig.Calculate(neofsecdsa.Signer(*key), binBody)
err = sig.Calculate(frostfsecdsa.Signer(*key), binBody)
if err != nil {
return fmt.Errorf("calculate signature: %w", err)
}

View file

@ -3,8 +3,8 @@ package control
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View file

@ -7,10 +7,11 @@
package control
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (

View file

@ -4,7 +4,7 @@ package control;
import "pkg/services/control/types.proto";
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/control";
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/control";
// `ControlService` provides an interface for internal work with the storage node.
service ControlService {

View file

@ -8,6 +8,7 @@ package control
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"

View file

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package control
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
// StableSize returns the size of x in protobuf format.
//

View file

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
)
func TestHealthCheckResponse_Body_StableMarshal(t *testing.T) {

View file

@ -7,10 +7,11 @@
package control
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (

View file

@ -2,7 +2,7 @@ syntax = "proto3";
package control;
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/control";
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/control";
// Signature of some message.
message Signature {

View file

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
package control
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
// StableSize returns the size of x in protobuf format.
//

View file

@ -6,10 +6,10 @@ import (
"strconv"
"testing"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/blobovniczatree"
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/fstree"
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/blobovniczatree"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
)
func TestNetmap_StableMarshal(t *testing.T) {