Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultProxyImplementFunc ¶ added in v1.5.6
func DefaultProxyImplementFunc(p *Proxy, v common.RPCService)
DefaultProxyImplementFunc the default function for proxy impl
Types ¶
type ImplementFunc ¶ added in v1.5.6
type ImplementFunc func(p *Proxy, v common.RPCService)
ImplementFunc function for proxy impl of RPCService functions
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
nolint
func NewProxyWithOptions ¶ added in v1.5.6
func NewProxyWithOptions(invoke protocol.Invoker, callback interface{}, attachments map[string]string, opts ...ProxyOption) *Proxy
NewProxyWithOptions create service proxy with options.
func (*Proxy) GetCallback ¶ added in v1.3.0
func (p *Proxy) GetCallback() interface{}
GetCallback gets callback.
func (*Proxy) GetInvoker ¶ added in v1.5.6
GetInvoker gets Invoker.
func (*Proxy) Implement ¶
func (p *Proxy) Implement(v common.RPCService)
Implement proxy implement In consumer, RPCService like:
type XxxProvider struct { Yyy func(ctx context.Context, args []interface{}, rsp *Zzz) error }
type ProxyFactory ¶
type ProxyFactory interface { GetProxy(invoker protocol.Invoker, url *common.URL) *Proxy GetAsyncProxy(invoker protocol.Invoker, callBack interface{}, url *common.URL) *Proxy GetInvoker(url *common.URL) protocol.Invoker }
ProxyFactory interface.
type ProxyOption ¶ added in v1.5.6
type ProxyOption func(p *Proxy)
ProxyOption a function to init Proxy with options
func WithProxyImplementFunc ¶ added in v1.5.6
func WithProxyImplementFunc(f ImplementFunc) ProxyOption
WithProxyImplementFunc an option function to setup proxy.ImplementFunc
Click to show internal directories.
Click to hide internal directories.