Documentation
¶
Index ¶
- Constants
- func GetGenericStreamingMode(ctx context.Context) serviceinfo.StreamingMode
- func WithGenericStreamingMode(ctx context.Context, sm serviceinfo.StreamingMode) context.Context
- type Args
- func (g *Args) GetFirstArgument() interface{}
- func (g *Args) GetOrSetBase() interface{}
- func (g *Args) Read(ctx context.Context, method string, dataLen int, in bufiox.Reader) error
- func (g *Args) ReadPb(ctx context.Context, method string, in []byte) error
- func (g *Args) SetCodec(inner interface{})
- func (g *Args) Write(ctx context.Context, method string, out bufiox.Writer) error
- func (g *Args) WritePb(ctx context.Context, method string) (interface{}, error)
- type Result
- func (r *Result) GetResult() interface{}
- func (r *Result) GetSuccess() interface{}
- func (r *Result) IsSetSuccess() bool
- func (r *Result) Read(ctx context.Context, method string, dataLen int, in bufiox.Reader) error
- func (r *Result) ReadPb(ctx context.Context, method string, in []byte) error
- func (r *Result) SetCodec(inner interface{})
- func (r *Result) SetSuccess(x interface{})
- func (r *Result) Write(ctx context.Context, method string, out bufiox.Writer) error
- func (r *Result) WritePb(ctx context.Context, method string) (interface{}, error)
- type ThriftReader
- type ThriftWriter
Constants ¶
View Source
const ( // BinaryThriftGenericV1PayloadCodecKey is used to be compatible with old binary thrift generic to get the payload codec. BinaryThriftGenericV1PayloadCodecKey = "binary_thrift_generic_v1_payload_codec" // GetMethodNameByRequestFuncKey is used to get method name by request for http generic. GetMethodNameByRequestFuncKey = "get_method_name_by_request_func" // IsBinaryGeneric is used to judge whether it is binary generic, except BinaryThriftGeneric. IsBinaryGeneric = "is_binary_generic" )
Variables ¶
This section is empty.
Functions ¶
func GetGenericStreamingMode ¶ added in v0.15.0
func GetGenericStreamingMode(ctx context.Context) serviceinfo.StreamingMode
GetGenericStreamingMode gets the generic streaming mode from the context.
func WithGenericStreamingMode ¶ added in v0.15.0
func WithGenericStreamingMode(ctx context.Context, sm serviceinfo.StreamingMode) context.Context
WithGenericStreamingMode sets the generic streaming mode to the context. It provides stream mode information for the ServiceInfo.MethodInfo() lookup interface to obtain the correct MethodInfo in binary generic scenarios.
Types ¶
type Args ¶
type Args struct {
Request interface{}
Method string
// contains filtered or unexported fields
}
Args generic request
func (*Args) GetFirstArgument ¶
func (g *Args) GetFirstArgument() interface{}
GetFirstArgument implements util.KitexArgs.
func (*Args) GetOrSetBase ¶
func (g *Args) GetOrSetBase() interface{}
type Result ¶
type Result struct {
Success interface{}
// contains filtered or unexported fields
}
Result generic response
func (*Result) GetSuccess ¶
func (r *Result) GetSuccess() interface{}
GetSuccess implements util.KitexResult.
func (*Result) SetSuccess ¶
func (r *Result) SetSuccess(x interface{})
SetSuccess implements util.KitexResult.
type ThriftReader ¶
Click to show internal directories.
Click to hide internal directories.