grpc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 18 Imported by: 9

Documentation

Index

Constants

View Source
const (
	DEFAULT_DISCOVERY_DEADLINE = 5 * time.Second
	DEFAULT_DISCOVERY_DELTA    = 60 * time.Second
)

Variables

This section is empty.

Functions

func IsErrCanceled

func IsErrCanceled(err error) bool

func IsErrDeadlineExceeded

func IsErrDeadlineExceeded(err error) bool

Types

type ClientConn

type ClientConn struct {
	Name       string
	Addr       string
	SSL        bool
	SkipVerify bool
	Timeout    time.Duration
}

Client Configuration

func (ClientConn) Open

func (config ClientConn) Open(log gopi.Logger) (gopi.Driver, error)

Open a client

type ClientPool

type ClientPool struct {
	SkipVerify bool
	SSL        bool
	Timeout    time.Duration
	Discovery  gopi.RPCServiceDiscovery
	Service    string
}

func (ClientPool) Open

func (config ClientPool) Open(log gopi.Logger) (gopi.Driver, error)

func (ClientPool) Services

func (config ClientPool) Services() []string

type GRPCClientConn

type GRPCClientConn interface {
	gopi.RPCClientConn

	// Return the gRPC ClientConn object
	GRPCConn() *grpc.ClientConn
}

GRPCClientConn is an RPCClientConn which also returns gRPC-specific properties

type GRPCServer

type GRPCServer interface {
	gopi.RPCServer

	// Return the gRPC Server object
	GRPCServer() *grpc.Server
}

GRPCServer interface is an RPCServer which also returns gRPC-specific properties

type Server

type Server struct {
	SSLKey         string
	SSLCertificate string
	Port           uint
	ServerOption   []grpc.ServerOption
}

Server is the RPC server configuration

func (Server) Open

func (config Server) Open(log gopi.Logger) (gopi.Driver, error)

Open the server

Jump to

Keyboard shortcuts

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