connection

package
v0.0.0-...-f852ded Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(proto, addr string, opts []grpc.DialOption) (*grpc.ClientConn, error)

Client creates a grpc client connected to `addr`.

func Server

func Server(proto, addr string, opts []grpc.ServerOption) (net.Listener, *grpc.Server)

Server creates a socket listening on `addr` and a grpc server. If it fails to open the socket, it tries again until it succeeds.

Types

type Credentials

type Credentials interface {
	// ClientOpts returns the `DialOption`s necessary to setup the credentials when
	// obtaining a grpc client connection.
	ClientOpts() []grpc.DialOption

	// ServerOpts returns the `ServerOption`s necessary to setup the credentials
	// when creating a grpc server.
	ServerOpts() []grpc.ServerOption
}

Credentials defines the credentials to use when creating a client or server.

Directories

Path Synopsis
tls
io
Package io is used to ensure that the various pieces of code that interact with credentials read and write files to consistent locations.
Package io is used to ensure that the various pieces of code that interact with credentials read and write files to consistent locations.
rsa

Jump to

Keyboard shortcuts

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