Documentation ¶
Index ¶
- func GetCodecInWrapperName(name constant.CodecType) string
- func GetTripleCodec(codecName constant.CodecType) (encoding.Codec, error)
- func SetTripleCodec(codecType constant.CodecType, f CodecFactory, opt ...*config.Option)
- type CodecFactory
- type DubboAttachment
- type ErrorWithAttachment
- type GenericCodec
- type OuterResult
- type TripleError
- type TripleGrpcReflectService
- type TripleGrpcService
- type TripleUnaryService
- type TwoWayCodec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCodecInWrapperName ¶
GetCodecInWrapperName get SerializeType of proto.TripleRequestWrapper from CodecType @name registered before
func GetTripleCodec ¶
GetTripleCodec get Codec impl by @codecName
func SetTripleCodec ¶
func SetTripleCodec(codecType constant.CodecType, f CodecFactory, opt ...*config.Option)
SetTripleCodec register CodecFactory @f and CodecType @codecType, with @opt[0].SerializerTypeInWrapper
Types ¶
type DubboAttachment ¶
type DubboAttachment map[string]interface{}
type ErrorWithAttachment ¶
type ErrorWithAttachment struct {
// contains filtered or unexported fields
}
func NewErrorWithAttachment ¶
func NewErrorWithAttachment(err error, attachments DubboAttachment) *ErrorWithAttachment
func (*ErrorWithAttachment) Error ¶
func (e *ErrorWithAttachment) Error() string
func (*ErrorWithAttachment) GetAttachments ¶
func (e *ErrorWithAttachment) GetAttachments() DubboAttachment
func (*ErrorWithAttachment) GetError ¶
func (e *ErrorWithAttachment) GetError() error
type GenericCodec ¶
type OuterResult ¶
type OuterResult interface { // Result gets invoker result. Result() interface{} // Attachments gets all attachments Attachments() map[string]interface{} }
OuterResult is a dubbo RPC result
type TripleError ¶
type TripleGrpcReflectService ¶
type TripleGrpcReflectService interface {
SetGRPCServer(s *grpc.Server)
}
TripleGrpcReflectService is gRPC service, used to check impl
type TripleGrpcService ¶
type TripleGrpcService interface {
XXX_ServiceDesc() *grpc.ServiceDesc
}
TripleGrpcService is gRPC service, used to check impl
type TripleUnaryService ¶
type TripleUnaryService interface { InvokeWithArgs(ctx context.Context, methodName string, arguments []interface{}) (interface{}, error) GetReqParamsInterfaces(methodName string) ([]interface{}, bool) }
TripleUnaryService is normal protocol service (except grpc service), should be implemented by users
type TwoWayCodec ¶
type TwoWayCodec interface { MarshalRequest(interface{}) ([]byte, error) MarshalResponse(interface{}) ([]byte, error) UnmarshalRequest(data []byte, v interface{}) error UnmarshalResponse(data []byte, v interface{}) error }
TwoWayCodec is directly used by triple network logic It can specify the marshal and unmarshal logic of req and rsp
Click to show internal directories.
Click to hide internal directories.