wrapper

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStreamClient

func WithStreamClient(opts ...Option) grpc.DialOption

func WithStreamServer

func WithStreamServer(opts ...Option) grpc.ServerOption

func WithUnaryClient

func WithUnaryClient(opts ...Option) grpc.DialOption

func WithUnaryServer

func WithUnaryServer(opts ...Option) grpc.ServerOption

Types

type ErrorHandler

type ErrorHandler func(err error) error

type Handler

type Handler func(ctx context.Context, md metadata.MD) (context.Context, metadata.MD)

type Option

type Option struct {
	grpc.EmptyCallOption
	// contains filtered or unexported fields
}

func WithErrorWrapper

func WithErrorWrapper(h ErrorHandler) Option

WithErrorWrapper 错误装饰器

func WithWrapper

func WithWrapper(h Handler) Option

Jump to

Keyboard shortcuts

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