Flatten internal/pkg and remove unused internal/pkg/node (#526)
This commit is contained in:
parent
c8376a3eb7
commit
61632095e9
@ -1,28 +0,0 @@
|
||||
// Copyright (C) 2018 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
package node
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"storj.io/storj/pkg/pb"
|
||||
)
|
||||
|
||||
// MockClient is a mock implementation of a Node client
|
||||
type MockClient struct {
|
||||
response []*pb.Node
|
||||
}
|
||||
|
||||
// Lookup is a mock of a node.Client Lookup
|
||||
// it echoes the request as the stored response on the struct
|
||||
func (mc *MockClient) Lookup(ctx context.Context, to pb.Node, find pb.Node) ([]*pb.Node, error) {
|
||||
return mc.response, nil
|
||||
}
|
||||
|
||||
// NewMockClient initializes a mock client with the default values and returns a pointer to a MockClient
|
||||
func NewMockClient(response []*pb.Node) *MockClient {
|
||||
return &MockClient{
|
||||
response: response,
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ import (
|
||||
"io/ioutil"
|
||||
"sync"
|
||||
|
||||
"storj.io/storj/internal/pkg/readcloser"
|
||||
"storj.io/storj/internal/readcloser"
|
||||
"storj.io/storj/pkg/encryption"
|
||||
"storj.io/storj/pkg/ranger"
|
||||
"storj.io/storj/pkg/utils"
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"storj.io/storj/internal/pkg/readcloser"
|
||||
"storj.io/storj/internal/readcloser"
|
||||
"storj.io/storj/pkg/ranger"
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/vivint/infectious"
|
||||
|
||||
"storj.io/storj/internal/pkg/readcloser"
|
||||
"storj.io/storj/internal/readcloser"
|
||||
"storj.io/storj/pkg/encryption"
|
||||
"storj.io/storj/pkg/ranger"
|
||||
"storj.io/storj/pkg/storj"
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"storj.io/storj/internal/pkg/readcloser"
|
||||
"storj.io/storj/internal/readcloser"
|
||||
"storj.io/storj/pkg/ranger"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"storj.io/storj/internal/pkg/readcloser"
|
||||
"storj.io/storj/internal/readcloser"
|
||||
)
|
||||
|
||||
// A Ranger is a flexible data stream type that allows for more effective
|
||||
|
Loading…
Reference in New Issue
Block a user