Documentation
¶
Index ¶
- func NewDefaultProxyFactory(_ ...proxy.Option) proxy.ProxyFactory
- func NewPassThroughProxyFactory(_ ...proxy.Option) proxy.ProxyFactory
- type DefaultProxyFactory
- type PassThroughProxyFactory
- func (factory *PassThroughProxyFactory) GetAsyncProxy(invoker base.Invoker, callBack any, url *common.URL) *proxy.Proxy
- func (factory *PassThroughProxyFactory) GetInvoker(url *common.URL) base.Invoker
- func (factory *PassThroughProxyFactory) GetProxy(invoker base.Invoker, url *common.URL) *proxy.Proxy
- type PassThroughProxyInvoker
- type ProxyInvoker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultProxyFactory ¶
func NewDefaultProxyFactory(_ ...proxy.Option) proxy.ProxyFactory
NewDefaultProxyFactory returns a proxy factory instance
func NewPassThroughProxyFactory ¶
func NewPassThroughProxyFactory(_ ...proxy.Option) proxy.ProxyFactory
NewPassThroughProxyFactory returns a proxy factory instance
Types ¶
type DefaultProxyFactory ¶
type DefaultProxyFactory struct {
}
DefaultProxyFactory is the default proxy factory
func (*DefaultProxyFactory) GetAsyncProxy ¶
func (factory *DefaultProxyFactory) GetAsyncProxy(invoker base.Invoker, callBack any, url *common.URL) *proxy.Proxy
GetAsyncProxy gets a async proxy
func (*DefaultProxyFactory) GetInvoker ¶
func (factory *DefaultProxyFactory) GetInvoker(url *common.URL) base.Invoker
GetInvoker gets a invoker
type PassThroughProxyFactory ¶
type PassThroughProxyFactory struct {
}
PassThroughProxyFactory is the factory of PassThroughProxyInvoker
func (*PassThroughProxyFactory) GetAsyncProxy ¶
func (factory *PassThroughProxyFactory) GetAsyncProxy(invoker base.Invoker, callBack any, url *common.URL) *proxy.Proxy
GetAsyncProxy gets a async proxy
func (*PassThroughProxyFactory) GetInvoker ¶
func (factory *PassThroughProxyFactory) GetInvoker(url *common.URL) base.Invoker
GetInvoker gets a invoker
type PassThroughProxyInvoker ¶
type PassThroughProxyInvoker struct {
*ProxyInvoker
}
PassThroughProxyInvoker is a invoker struct, it calls service with specific method 'Serivce' and params: Service(method string, argsTypes []string, args [][]byte, attachment map[string]any) PassThroughProxyInvoker pass through raw invocation data and method name to service, which will deal with them.
func (*PassThroughProxyInvoker) Invoke ¶
func (pi *PassThroughProxyInvoker) Invoke(ctx context.Context, invocation base.Invocation) result.Result
Invoke is used to call service method by invocation
type ProxyInvoker ¶
type ProxyInvoker struct {
base.BaseInvoker
}
ProxyInvoker is a invoker struct
func (*ProxyInvoker) Invoke ¶
func (pi *ProxyInvoker) Invoke(ctx context.Context, invocation base.Invocation) result.Result
Invoke is used to call service method by invocation