timeout

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(defaultTimeout time.Duration, opts ...Option) grpc.StreamServerInterceptor

StreamServerInterceptor 创建服务端流式 RPC 超时拦截器。

func UnaryServerInterceptor

func UnaryServerInterceptor(defaultTimeout time.Duration, opts ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor 创建服务端一元 RPC 超时拦截器。

Types

type Option

type Option func(*options)

Option 配置超时拦截器。

func WithSkipFunc

func WithSkipFunc(fn func(method string) bool) Option

WithSkipFunc 设置跳过超时的方法判断函数。

Jump to

Keyboard shortcuts

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