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

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