Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultProxyImplementFunc ¶
func DefaultProxyImplementFunc(p *Proxy, v common.RPCService)
DefaultProxyImplementFunc the default function for proxy impl
Types ¶
type ImplementFunc ¶
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 ¶
func NewProxyWithOptions(invoke protocol.Invoker, callback interface{}, attachments map[string]string, opts ...ProxyOption) *Proxy
NewProxyWithOptions create service proxy with options.
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 ProxyOption ¶
type ProxyOption func(p *Proxy)
ProxyOption a function to init Proxy with options
func WithProxyImplementFunc ¶
func WithProxyImplementFunc(f ImplementFunc) ProxyOption
WithProxyImplementFunc an option function to setup proxy.ImplementFunc
Click to show internal directories.
Click to hide internal directories.