Documentation ¶
Index ¶
- func WithArguments(arguments []interface{}) option
- func WithAttachments(attachments map[string]interface{}) option
- func WithCallBack(callBack interface{}) option
- func WithInvoker(invoker protocol.Invoker) option
- func WithMethodName(methodName string) option
- func WithParameterTypeNames(parameterTypeNames []string) option
- func WithParameterTypes(parameterTypes []reflect.Type) option
- func WithParameterValues(parameterValues []reflect.Value) option
- func WithReply(reply interface{}) option
- type RPCInvocation
- func (r *RPCInvocation) ActualMethodName() string
- func (r *RPCInvocation) Arguments() []interface{}
- func (r *RPCInvocation) Attachment(key string) interface{}
- func (r *RPCInvocation) Attachments() map[string]interface{}
- func (r *RPCInvocation) AttachmentsByKey(key string, defaultValue string) string
- func (r *RPCInvocation) AttributeByKey(key string, defaultValue interface{}) interface{}
- func (r *RPCInvocation) Attributes() map[string]interface{}
- func (r *RPCInvocation) CallBack() interface{}
- func (r *RPCInvocation) Invoker() protocol.Invoker
- func (r *RPCInvocation) IsGenericInvocation() bool
- func (r *RPCInvocation) MethodName() string
- func (r *RPCInvocation) ParameterTypeNames() []string
- func (r *RPCInvocation) ParameterTypes() []reflect.Type
- func (r *RPCInvocation) ParameterValues() []reflect.Value
- func (r *RPCInvocation) Reply() interface{}
- func (r *RPCInvocation) ServiceKey() string
- func (r *RPCInvocation) SetAttachments(key string, value interface{})
- func (r *RPCInvocation) SetAttribute(key string, value interface{})
- func (r *RPCInvocation) SetCallBack(c interface{})
- func (r *RPCInvocation) SetInvoker(invoker protocol.Invoker)
- func (r *RPCInvocation) SetReply(reply interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithArguments ¶
func WithArguments(arguments []interface{}) option
WithArguments creates option with @arguments function.
func WithAttachments ¶ added in v1.2.0
func WithAttachments(attachments map[string]interface{}) option
WithAttachments creates option with @attachments.
func WithCallBack ¶ added in v1.2.0
func WithCallBack(callBack interface{}) option
WithCallBack creates option with @callback function.
func WithInvoker ¶ added in v1.2.0
WithInvoker creates option with @invoker.
func WithMethodName ¶
func WithMethodName(methodName string) option
WithMethodName creates option with @methodName.
func WithParameterTypeNames ¶ added in v1.5.6
func WithParameterTypeNames(parameterTypeNames []string) option
WithParameterTypeNames creates option with @parameterTypeNames.
func WithParameterTypes ¶
WithParameterTypes creates option with @parameterTypes.
func WithParameterValues ¶ added in v1.3.0
WithParameterValues creates option with @parameterValues
Types ¶
type RPCInvocation ¶
type RPCInvocation struct {
// contains filtered or unexported fields
}
/////////////////////////// Invocation Implement of RPC /////////////////////////// todo: is it necessary to separate fields of consumer(provider) from RPCInvocation nolint
func NewRPCInvocation ¶ added in v1.2.0
func NewRPCInvocation(methodName string, arguments []interface{}, attachments map[string]interface{}) *RPCInvocation
NewRPCInvocation creates a RPC invocation.
func NewRPCInvocationWithOptions ¶
func NewRPCInvocationWithOptions(opts ...option) *RPCInvocation
NewRPCInvocationWithOptions creates a RPC invocation with @opts.
func (*RPCInvocation) ActualMethodName ¶ added in v1.5.8
func (r *RPCInvocation) ActualMethodName() string
ActualMethodName gets actual invocation method name. It returns the method name been called if it's a generic call
func (*RPCInvocation) Arguments ¶
func (r *RPCInvocation) Arguments() []interface{}
Arguments gets RPC arguments.
func (*RPCInvocation) Attachment ¶ added in v1.5.3
func (r *RPCInvocation) Attachment(key string) interface{}
Attachment returns the corresponding value from dubbo's attachment with the given key.
func (*RPCInvocation) Attachments ¶
func (r *RPCInvocation) Attachments() map[string]interface{}
Attachments gets all attachments of RPC.
func (*RPCInvocation) AttachmentsByKey ¶
func (r *RPCInvocation) AttachmentsByKey(key string, defaultValue string) string
AttachmentsByKey gets RPC attachment by key, if nil then return default value.
func (*RPCInvocation) AttributeByKey ¶ added in v1.5.0
func (r *RPCInvocation) AttributeByKey(key string, defaultValue interface{}) interface{}
AttributeByKey gets attribute by @key. If it is not exist, it will return default value.
func (*RPCInvocation) Attributes ¶ added in v1.5.0
func (r *RPCInvocation) Attributes() map[string]interface{}
Attributes gets all attributes of RPC.
func (*RPCInvocation) CallBack ¶
func (r *RPCInvocation) CallBack() interface{}
CallBack sets RPC callback method.
func (*RPCInvocation) Invoker ¶
func (r *RPCInvocation) Invoker() protocol.Invoker
Invoker gets the invoker in current context.
func (*RPCInvocation) IsGenericInvocation ¶ added in v1.5.8
func (r *RPCInvocation) IsGenericInvocation() bool
IsGenericInvocation checks if this is a generic invocation
func (*RPCInvocation) MethodName ¶
func (r *RPCInvocation) MethodName() string
MethodName gets RPC invocation method name.
func (*RPCInvocation) ParameterTypeNames ¶ added in v1.5.6
func (r *RPCInvocation) ParameterTypeNames() []string
ParameterTypeNames gets RPC invocation parameter types of string expression.
func (*RPCInvocation) ParameterTypes ¶
func (r *RPCInvocation) ParameterTypes() []reflect.Type
ParameterTypes gets RPC invocation parameter types.
func (*RPCInvocation) ParameterValues ¶ added in v1.3.0
func (r *RPCInvocation) ParameterValues() []reflect.Value
ParameterValues gets RPC invocation parameter values.
func (*RPCInvocation) Reply ¶
func (r *RPCInvocation) Reply() interface{}
Reply gets response of RPC request.
func (*RPCInvocation) ServiceKey ¶ added in v1.5.3
func (r *RPCInvocation) ServiceKey() string
func (*RPCInvocation) SetAttachments ¶
func (r *RPCInvocation) SetAttachments(key string, value interface{})
SetAttachments sets attribute by @key and @value.
func (*RPCInvocation) SetAttribute ¶ added in v1.5.0
func (r *RPCInvocation) SetAttribute(key string, value interface{})
SetAttribute sets attribute by @key and @value.
func (*RPCInvocation) SetCallBack ¶
func (r *RPCInvocation) SetCallBack(c interface{})
SetCallBack sets RPC callback method.
func (*RPCInvocation) SetInvoker ¶
func (r *RPCInvocation) SetInvoker(invoker protocol.Invoker)
nolint
func (*RPCInvocation) SetReply ¶
func (r *RPCInvocation) SetReply(reply interface{})
SetReply sets response of RPC request.