rpcpeer

package
v0.23.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("rpcpeer")

Error is the class of errors returned by this package.

Functions

func NewContext

func NewContext(ctx context.Context, peer *Peer) context.Context

NewContext returns a new context with the peer associated as a value.

Types

type Peer

type Peer struct {
	Addr  net.Addr
	State tls.ConnectionState
}

Peer represents an rpc peer.

func FromContext

func FromContext(ctx context.Context) (*Peer, error)

FromContext returns the peer that was previously associated by NewContext.

Jump to

Keyboard shortcuts

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