Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CodesErrors = map[codes.Code]string{ codes.OK: "ok", codes.Canceled: "canceled", codes.Unknown: "unknown", codes.InvalidArgument: "invalid_argument", codes.DeadlineExceeded: "deadline_exceeded", codes.NotFound: "not_found", codes.AlreadyExists: "already_exists", codes.PermissionDenied: "permission_denied", codes.ResourceExhausted: "resource_exhausted", codes.FailedPrecondition: "failed_precondition", codes.Aborted: "aborted", codes.OutOfRange: "out_of_range", codes.Unimplemented: "unimplemented", codes.Internal: "internal", codes.Unavailable: "unavailable", codes.DataLoss: "data_loss", codes.Unauthenticated: "unauthenticated", }
CodesErrors some erorrs string for grpc codes
Functions ¶
func CodeToError ¶ added in v1.2.0
CodeToError translate grpc codes to error
Types ¶
type MuxedGrpc ¶ added in v1.2.1
type MuxedGrpc struct { }
MuxedGrpc check the context is by mux grpc
type ServeMux ¶
ServeMux the custom serve mux that implement grpc ServeMux to simplify the http restful
func NewServeMux ¶
func NewServeMux(opts ...runtime.ServeMuxOption) *ServeMux
NewServeMux allocates and returns a new ServeMux.
Click to show internal directories.
Click to hide internal directories.