connection

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialPeer

func DialPeer(peer PeerInfo, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Types

type Manager

type Manager struct {
	Server   *grpc.Server
	Listener net.Listener
	Self     PeerInfo

	Cert *tls.Certificate
	// contains filtered or unexported fields
}

func New

func New(addr string, certFile string, keyFile string) (_ *Manager, err error)

func (*Manager) DialPeer

func (c *Manager) DialPeer(peer PeerInfo, opts ...grpc.DialOption) (*grpc.ClientConn, error)

type PeerInfo

type PeerInfo struct {
	// contains filtered or unexported fields
}

func GetPeerInfo

func GetPeerInfo(s grpc.Stream) PeerInfo

func NewPeerInfo

func NewPeerInfo(addr string, cert []byte) (_ PeerInfo, err error)

func (*PeerInfo) Cert

func (pi *PeerInfo) Cert() *x509.Certificate

func (*PeerInfo) Fingerprint

func (pi *PeerInfo) Fingerprint() string

func (PeerInfo) String

func (pi PeerInfo) String() string

Jump to

Keyboard shortcuts

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