grpchelper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package grpchelper implements helpers to access gRPC services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conn

func Conn(addr string, connTimeout time.Duration, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Conn returns a gRPC client connection once connecting the server.

func Request

func Request(ctx context.Context, rpcTimeout time.Duration, fn func(rpcCtx context.Context) error) error

Request execute a input closure to send traffics. It provides common features like timeout, error handling, and etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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