extgrpc

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthExtGrpc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExtGrpc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExtGrpc = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetGrpcCode

func GetGrpcCode(err error) codes.Code

GetGrpcCode retrieves the gRPC code from a stack of causes.

func WrapWithGrpcCode

func WrapWithGrpcCode(err error, code codes.Code) error

WrapWithGrpcCode wraps an error with a gRPC status code.

Types

type EncodedGrpcCode

type EncodedGrpcCode struct {
	Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}

func (*EncodedGrpcCode) Descriptor

func (*EncodedGrpcCode) Descriptor() ([]byte, []int)

func (*EncodedGrpcCode) Marshal

func (m *EncodedGrpcCode) Marshal() (dAtA []byte, err error)

func (*EncodedGrpcCode) MarshalTo

func (m *EncodedGrpcCode) MarshalTo(dAtA []byte) (int, error)

func (*EncodedGrpcCode) MarshalToSizedBuffer

func (m *EncodedGrpcCode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EncodedGrpcCode) ProtoMessage

func (*EncodedGrpcCode) ProtoMessage()

func (*EncodedGrpcCode) Reset

func (m *EncodedGrpcCode) Reset()

func (*EncodedGrpcCode) Size

func (m *EncodedGrpcCode) Size() (n int)

func (*EncodedGrpcCode) String

func (m *EncodedGrpcCode) String() string

func (*EncodedGrpcCode) Unmarshal

func (m *EncodedGrpcCode) Unmarshal(dAtA []byte) error

func (*EncodedGrpcCode) XXX_DiscardUnknown

func (m *EncodedGrpcCode) XXX_DiscardUnknown()

func (*EncodedGrpcCode) XXX_Marshal

func (m *EncodedGrpcCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EncodedGrpcCode) XXX_Merge

func (m *EncodedGrpcCode) XXX_Merge(src proto.Message)

func (*EncodedGrpcCode) XXX_Size

func (m *EncodedGrpcCode) XXX_Size() int

func (*EncodedGrpcCode) XXX_Unmarshal

func (m *EncodedGrpcCode) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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