Documentation ¶
Index ¶
- func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func ClientErrorx() grpc.UnaryClientInterceptor
- func ClientRecovery() grpc.UnaryClientInterceptor
- func ClientValidation() grpc.UnaryClientInterceptor
- func ServerLogger() grpc.UnaryServerInterceptor
- func ServerRecovery() grpc.UnaryServerInterceptor
- func ServerValidation() grpc.UnaryServerInterceptor
- func SevrerErrorx() grpc.UnaryServerInterceptor
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.