grpcx

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainUnaryServer

func ChainUnaryServer(
	interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

ChainUnaryServer creates a single interceptor out of a chain of many interceptors.

Execution is done in left-to-right order, including passing of context. For example chainUnaryServer(one, two, three) will execute one before two before three, and three will see context changes of one and two.

func ClientErrorx

func ClientErrorx() grpc.UnaryClientInterceptor

func ClientRecovery

func ClientRecovery() grpc.UnaryClientInterceptor

func ClientValidation

func ClientValidation() grpc.UnaryClientInterceptor

ClientValidation validate the client's requests before requests are sending to server, which may avoid wasting network bandwidth. Of course server would check again. The difference between client and server is that client check all fields in the request, but server aborts the validation immediately, since any invalid field is encountered.

func ServerLogger

func ServerLogger() grpc.UnaryServerInterceptor

func ServerRecovery

func ServerRecovery() grpc.UnaryServerInterceptor

func ServerValidation

func ServerValidation() grpc.UnaryServerInterceptor

ServerValidation check all requests from clients. In order to save the server's compute resources, validation process will be aborted if any invalidation is encountered.

func SevrerErrorx

func SevrerErrorx() grpc.UnaryServerInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

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