rpc

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IsDRPC is true if drpc is being used.
	IsDRPC = false

	// IsGRPC is true if grpc is being used.
	IsGRPC = true
)

Variables

View Source
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) Close

func (c *Conn) Close() error

Close closes the 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) RawConn

func (c *Conn) RawConn() *RawConn

RawConn returns the underlying 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

func NewDefaultDialer(tlsOptions *tlsopts.Options) Dialer

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

func (d Dialer) DialAddressInsecure(ctx context.Context, address string) (_ *Conn, err error)

DialAddressInsecure dials to the specified address and does not check the node id.

func (Dialer) DialAddressUnencrypted

func (d Dialer) DialAddressUnencrypted(ctx context.Context, address string) (_ *Conn, err error)

DialAddressUnencrypted dials to the specified address without tls.

func (Dialer) DialNode

func (d Dialer) DialNode(ctx context.Context, node *pb.Node) (_ *Conn, err error)

DialNode creates an rpc connection to the specified node.

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 RawConn

type RawConn = grpc.ClientConn

RawConn is a type alias to a grpc client connection

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL