timeout

package
v0.0.0-...-9ff9bfb Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Timeout

func Timeout(opts ...Option) grpc.UnaryClientInterceptor

Timeout is the interceptor that will add a timeout to the context of the request if it is not already set. The default timeout added is 10s. You can customize it by specifying WihtTimeout option.

Types

type Option

type Option func(*opts)

Option is a function that configures the Timeout interceptor.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout is an Option sets the timeout for the interceptor.

Jump to

Keyboard shortcuts

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