storj/pkg/transport/client.go
Egon Elbre b6b6111173
Flatten proto definitions into a single package (#360)
* protos: move streams to pb
* protos: move overlay to pb
* protos: move pointerdb to pb
* protos: move piecestore to pb
* fix statdb import naming
2018-09-18 07:39:06 +03:00

27 lines
621 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"
"storj.io/storj/pkg/pb"
)
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 pb.NodeAddress) (*grpc.ClientConn, error)
DialNode(ctx context.Context, node *pb.Node) (*grpc.ClientConn, error)
}