grpchelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package grpchelper wraps the adaptors implemented by package grpcclientidentity into a less flexible API which, however, ensures that the individual adaptor primitive's expectations are met and hence do not panic.

Index

Constants

View Source
const (
	StartKeepalivesAfterInactivityDuration = 5 * time.Second
	KeepalivePeerTimeout                   = 10 * time.Second
)

The following constants are relevant for interoperability. We use the same values for client & server, because zrepl is more symmetrical ("one source, one sink") instead of the typical gRPC scenario ("many clients, single server")

Variables

This section is empty.

Functions

func ClientConn

func ClientConn(cn transport.Connecter, log Logger) *grpc.ClientConn

ClientConn is an easy-to-use wrapper around the Dialer and TransportCredentials interface to produce a grpc.ClientConn

func NewServer

func NewServer(authListenerFactory transport.AuthenticatedListenerFactory, clientIdentityKey interface{}, logger grpcclientidentity.Logger) (srv *grpc.Server, serve func() error, err error)

NewServer is a convenience interface around the TransportCredentials and Interceptors interface.

Types

type Logger

type Logger = logger.Logger

Jump to

Keyboard shortcuts

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