Documentation ¶
Index ¶
- Constants
- Variables
- type CertificatesClient
- type Conn
- func (c *Conn) CertificatesClient() CertificatesClient
- func (c *Conn) Close() error
- func (c *Conn) ConnectionState() tls.ConnectionState
- func (c *Conn) ContactClient() ContactClient
- func (c *Conn) HealthInspectorClient() HealthInspectorClient
- func (c *Conn) IrreparableInspectorClient() IrreparableInspectorClient
- func (c *Conn) KadInspectorClient() KadInspectorClient
- func (c *Conn) MetainfoClient() MetainfoClient
- func (c *Conn) NodeClient() NodeClient
- func (c *Conn) NodeStatsClient() NodeStatsClient
- func (c *Conn) NodesClient() NodesClient
- func (c *Conn) OrdersClient() OrdersClient
- func (c *Conn) OverlayInspectorClient() OverlayInspectorClient
- func (c *Conn) PeerIdentity() (*identity.PeerIdentity, error)
- func (c *Conn) PieceStoreInspectorClient() PieceStoreInspectorClient
- func (c *Conn) PiecestoreClient() PiecestoreClient
- func (c *Conn) RawConn() *RawConn
- func (c *Conn) VouchersClient() VouchersClient
- type ContactClient
- type Dialer
- func (d Dialer) DialAddressID(ctx context.Context, address string, id storj.NodeID) (_ *Conn, err error)
- func (d Dialer) DialAddressInsecure(ctx context.Context, address string) (_ *Conn, err error)
- func (d Dialer) DialAddressUnencrypted(ctx context.Context, address string) (_ *Conn, err error)
- func (d Dialer) DialNode(ctx context.Context, node *pb.Node) (_ *Conn, err error)
- type HealthInspectorClient
- type IrreparableInspectorClient
- type KadInspectorClient
- type MetainfoClient
- type NodeClient
- type NodeStatsClient
- type NodesClient
- type OrdersClient
- type OverlayInspectorClient
- type PieceStoreInspectorClient
- type PiecestoreClient
- type RawConn
- type VouchersClient
Constants ¶
const ( // IsDRPC is true if drpc is being used. IsDRPC = false // IsGRPC is true if grpc is being used. IsGRPC = true )
Variables ¶
var Error = errs.Class("rpccompat")
Error wraps all of the errors returned by this package.
Functions ¶
This section is empty.
Types ¶
type CertificatesClient ¶
type CertificatesClient = pb.CertificatesClient
CertificatesClient is an alias to the grpc client interface
func NewCertificatesClient ¶
func NewCertificatesClient(rc *RawConn) CertificatesClient
NewCertificatesClient returns the grpc version of a CertificatesClient
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a wrapper around a drpc client connection.
func (*Conn) CertificatesClient ¶
func (c *Conn) CertificatesClient() CertificatesClient
CertificatesClient returns a CertificatesClient for this connection
func (*Conn) ConnectionState ¶
func (c *Conn) ConnectionState() tls.ConnectionState
ConnectionState returns the tls connection state.
func (*Conn) ContactClient ¶
func (c *Conn) ContactClient() ContactClient
ContactClient returns a ContactClient for this connection
func (*Conn) HealthInspectorClient ¶
func (c *Conn) HealthInspectorClient() HealthInspectorClient
HealthInspectorClient returns a HealthInspectorClient for this connection
func (*Conn) IrreparableInspectorClient ¶
func (c *Conn) IrreparableInspectorClient() IrreparableInspectorClient
IrreparableInspectorClient returns a IrreparableInspectorClient for this connection
func (*Conn) KadInspectorClient ¶
func (c *Conn) KadInspectorClient() KadInspectorClient
KadInspectorClient returns a KadInspectorClient for this connection
func (*Conn) MetainfoClient ¶
func (c *Conn) MetainfoClient() MetainfoClient
MetainfoClient returns a MetainfoClient for this connection
func (*Conn) NodeClient ¶
func (c *Conn) NodeClient() NodeClient
NodeClient returns a NodeClient for this connection
func (*Conn) NodeStatsClient ¶
func (c *Conn) NodeStatsClient() NodeStatsClient
NodeStatsClient returns a NodeStatsClient for this connection
func (*Conn) NodesClient ¶
func (c *Conn) NodesClient() NodesClient
NodesClient returns a NodesClient for this connection
func (*Conn) OrdersClient ¶
func (c *Conn) OrdersClient() OrdersClient
OrdersClient returns a OrdersClient for this connection
func (*Conn) OverlayInspectorClient ¶
func (c *Conn) OverlayInspectorClient() OverlayInspectorClient
OverlayInspectorClient returns a OverlayInspectorClient for this connection
func (*Conn) PeerIdentity ¶
func (c *Conn) PeerIdentity() (*identity.PeerIdentity, error)
PeerIdentity returns the peer identity on the other end of the connection.
func (*Conn) PieceStoreInspectorClient ¶
func (c *Conn) PieceStoreInspectorClient() PieceStoreInspectorClient
PieceStoreInspectorClient returns a PieceStoreInspectorClient for this connection
func (*Conn) PiecestoreClient ¶
func (c *Conn) PiecestoreClient() PiecestoreClient
PiecestoreClient returns a PiecestoreClient for this connection
func (*Conn) VouchersClient ¶
func (c *Conn) VouchersClient() VouchersClient
VouchersClient returns a VouchersClient for this connection
type ContactClient ¶
type ContactClient = pb.ContactClient
ContactClient is an alias to the grpc client interface
func NewContactClient ¶
func NewContactClient(rc *RawConn) ContactClient
NewContactClient returns the grpc version of a ContactClient
type Dialer ¶
type Dialer struct { // TLSOptions controls the tls options for dialing. If it is nil, only // insecure connections can be made. TLSOptions *tlsopts.Options // RequestTimeout causes any read/write operations on the raw socket // to error if they take longer than it if it is non-zero. RequestTimeout time.Duration // DialTimeout causes all the tcp dials to error if they take longer // than it if it is non-zero. DialTimeout time.Duration // DialLatency sleeps this amount if it is non-zero before every dial. // The timeout runs while the sleep is happening. DialLatency time.Duration // TransferRate limits all read/write operations to go slower than // the size per second if it is non-zero. TransferRate memory.Size }
Dialer holds configuration for dialing.
func NewDefaultDialer ¶
NewDefaultDialer returns a Dialer with default timeouts set.
func (Dialer) DialAddressID ¶
func (d Dialer) DialAddressID(ctx context.Context, address string, id storj.NodeID) (_ *Conn, err error)
DialAddressID dials to the specified address and asserts it has the given node id.
func (Dialer) DialAddressInsecure ¶
DialAddressInsecure dials to the specified address and does not check the node id.
func (Dialer) DialAddressUnencrypted ¶
DialAddressUnencrypted dials to the specified address without tls.
type HealthInspectorClient ¶
type HealthInspectorClient = pb.HealthInspectorClient
HealthInspectorClient is an alias to the grpc client interface
func NewHealthInspectorClient ¶
func NewHealthInspectorClient(rc *RawConn) HealthInspectorClient
NewHealthInspectorClient returns the grpc version of a HealthInspectorClient
type IrreparableInspectorClient ¶
type IrreparableInspectorClient = pb.IrreparableInspectorClient
IrreparableInspectorClient is an alias to the grpc client interface
func NewIrreparableInspectorClient ¶
func NewIrreparableInspectorClient(rc *RawConn) IrreparableInspectorClient
NewIrreparableInspectorClient returns the grpc version of a IrreparableInspectorClient
type KadInspectorClient ¶
type KadInspectorClient = pb.KadInspectorClient
KadInspectorClient is an alias to the grpc client interface
func NewKadInspectorClient ¶
func NewKadInspectorClient(rc *RawConn) KadInspectorClient
NewKadInspectorClient returns the grpc version of a KadInspectorClient
type MetainfoClient ¶
type MetainfoClient = pb.MetainfoClient
MetainfoClient is an alias to the grpc client interface
func NewMetainfoClient ¶
func NewMetainfoClient(rc *RawConn) MetainfoClient
NewMetainfoClient returns the grpc version of a MetainfoClient
type NodeClient ¶
type NodeClient = pb.NodeClient
NodeClient is an alias to the grpc client interface
func NewNodeClient ¶
func NewNodeClient(rc *RawConn) NodeClient
NewNodeClient returns the grpc version of a NodeClient
type NodeStatsClient ¶
type NodeStatsClient = pb.NodeStatsClient
NodeStatsClient is an alias to the grpc client interface
func NewNodeStatsClient ¶
func NewNodeStatsClient(rc *RawConn) NodeStatsClient
NewNodeStatsClient returns the grpc version of a NodeStatsClient
type NodesClient ¶
type NodesClient = pb.NodesClient
NodesClient is an alias to the grpc client interface
func NewNodesClient ¶
func NewNodesClient(rc *RawConn) NodesClient
NewNodesClient returns the grpc version of a NodesClient
type OrdersClient ¶
type OrdersClient = pb.OrdersClient
OrdersClient is an alias to the grpc client interface
func NewOrdersClient ¶
func NewOrdersClient(rc *RawConn) OrdersClient
NewOrdersClient returns the grpc version of a OrdersClient
type OverlayInspectorClient ¶
type OverlayInspectorClient = pb.OverlayInspectorClient
OverlayInspectorClient is an alias to the grpc client interface
func NewOverlayInspectorClient ¶
func NewOverlayInspectorClient(rc *RawConn) OverlayInspectorClient
NewOverlayInspectorClient returns the grpc version of a OverlayInspectorClient
type PieceStoreInspectorClient ¶
type PieceStoreInspectorClient = pb.PieceStoreInspectorClient
PieceStoreInspectorClient is an alias to the grpc client interface
func NewPieceStoreInspectorClient ¶
func NewPieceStoreInspectorClient(rc *RawConn) PieceStoreInspectorClient
NewPieceStoreInspectorClient returns the grpc version of a PieceStoreInspectorClient
type PiecestoreClient ¶
type PiecestoreClient = pb.PiecestoreClient
PiecestoreClient is an alias to the grpc client interface
func NewPiecestoreClient ¶
func NewPiecestoreClient(rc *RawConn) PiecestoreClient
NewPiecestoreClient returns the grpc version of a PiecestoreClient
type VouchersClient ¶
type VouchersClient = pb.VouchersClient
VouchersClient is an alias to the grpc client interface
func NewVouchersClient ¶
func NewVouchersClient(rc *RawConn) VouchersClient
NewVouchersClient returns the grpc version of a VouchersClient