d82486b85b
* lays out SegmentStore functions to implement * Merge branch 'master' into segment-store * adds overlay calls to put * allows SegmentStore Put to upload a file to ecclient, then save pointer to pointerdb * Merge branch 'master' into segment-store * removes new overlay client instance in Put * fixes syntax * fixes syntax again * fixes imports * fixes typo * removes pointerdb client from segmentStore struct for now * changes SegmentStore to segmentStore * changing types in parameters to fit other function calls * takes RedundancyStrategy out of Put params * changes NewClient param back to take an interface (not pointer to interface) * fixes types * moves pointer into PutRequest in SegmentStore Put * passes interfact, not pointer to interface to NewSegmentStore * fixes some types * Get returns an instance of Meta * fixes PutRequest fields * adds remotePieces slice to pointerdb PutRequest * ecClient Put now takes *proto.Nodes instead of proto.Nodes * fixes syntax * changes ec client dial interface to use *proto.Node * changes other instances of proto.Node to *proto.Node in ecclient pkg * adds *proto.Node to Get and Delete functions in ecclient pkg * changes proto.Node to pointer in ec client_test * changes proto.Node to pointer in ec client_test * adds ecclient and pointerdb client to the segmentstore constructor * adds ecclient and pointerDBClient to segmentStore constructor
27 lines
641 B
Go
27 lines
641 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package transport
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zeebo/errs"
|
|
"google.golang.org/grpc"
|
|
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
|
|
|
proto "storj.io/storj/protos/overlay"
|
|
)
|
|
|
|
var (
|
|
mon = monkit.Package()
|
|
//Error is the errs class of standard Transport Client errors
|
|
Error = errs.Class("transport error")
|
|
)
|
|
|
|
// Client defines the interface to an transport client.
|
|
type Client interface {
|
|
DialUnauthenticated(ctx context.Context, addr proto.NodeAddress) (*grpc.ClientConn, error)
|
|
DialNode(ctx context.Context, node *proto.Node) (*grpc.ClientConn, error)
|
|
}
|