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 ¶
Click to show internal directories.
Click to hide internal directories.