grpcutil

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout  = status.Errorf(codes.DeadlineExceeded, "")
	ErrInternal = status.Errorf(codes.Internal, "")
)

Functions

func GRPCResponse

func GRPCResponse[I, O any](ctx context.Context, l *zap.Logger, result chan I, chErrs []chan error, responseBuilder func(i I) (*O, error)) (*O, error)

func NewClient added in v0.0.8

func NewClient[T any](e env.Env, portNumber int, f func(grpc.ClientConnInterface) T, opts ...grpc.DialOption) (T, func() error, error)

func StreamRecvToChan

func StreamRecvToChan[K any](ctx context.Context, recv func() (K, error)) (chan K, chan error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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