ecode

package
Version: v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 3 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.

Source Files

Jump to

Keyboard shortcuts

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