grpcutil

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package grpcutil contains gRPC utilities useful to binding implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDefaultTimeout

func WithDefaultTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

WithDefaultTimeout returns context.WithTimeout(ctx, timeout) if ctx has no deadline; otherwise returns the context as-is and an empty cancel function.

func WithStreamDefaultTimeout

func WithStreamDefaultTimeout(timeout time.Duration) grpc.DialOption

WithStreamDefaultTimeout returns a dial option that intercepts stream requests and imposes the specified context timeout on the request if it does not already have a deadline.

func WithUnaryDefaultTimeout

func WithUnaryDefaultTimeout(timeout time.Duration) grpc.DialOption

WithUnaryDefaultTimeout returns a dial option that intercepts unary requests and imposes the specified context timeout on the request if it does not already have a deadline.

Types

This section is empty.

Directories

Path Synopsis
Package testservice provides an interface for testing with the Test service.
Package testservice provides an interface for testing with the Test service.
gen

Jump to

Keyboard shortcuts

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