Flatten internal/pkg and remove unused internal/pkg/node (#526)

This commit is contained in:
Egon Elbre 2018-10-25 11:24:39 +03:00 committed by GitHub
parent c8376a3eb7
commit 61632095e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 5 additions and 33 deletions

View File

@ -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,
}
}

View File

@ -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"

View File

@ -10,7 +10,7 @@ import (
"io"
"io/ioutil"
"storj.io/storj/internal/pkg/readcloser"
"storj.io/storj/internal/readcloser"
"storj.io/storj/pkg/ranger"
)

View File

@ -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"

View File

@ -9,7 +9,7 @@ import (
"io"
"io/ioutil"
"storj.io/storj/internal/pkg/readcloser"
"storj.io/storj/internal/readcloser"
"storj.io/storj/pkg/ranger"
)

View File

@ -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