ecode

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert added in v0.6.12

func Convert(err error) *status.Status

Convert 内部转换,为了让err=nil的时候,监控数据里有OK信息

func GrpcToHTTPStatusCode

func GrpcToHTTPStatusCode(statusCode codes.Code) int

GrpcToHTTPStatusCode gRPC转HTTP Code example: spbStatus := status.FromContextError(err) httpStatusCode := ecode.GrpcToHTTPStatusCode(spbStatus.Code())

Types

This section is empty.

Jump to

Keyboard shortcuts

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