Documentation ¶
Index ¶
- type Option
- type Options
- type Proxy
- func (r *Proxy) Go(call *rpc.Call)
- func (r *Proxy) OnDestroy()
- func (r *Proxy) OnInit()
- func (r *Proxy) RpcCall(servicePath string, serviceMethod string, args *rpc.Args, reply interface{}) error
- func (r *Proxy) Run(closeSig chan bool)
- func (r *Proxy) SetHandlerFilter(f filter)
- func (r *Proxy) SetRpcFilter(f filter)
- func (r *Proxy) SetRpcResponder(resp rpc.RpcResponder)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func ChanRetSize ¶
Size of return chan which is callback of rpc. Default is 10
func RegistryType ¶
Register service type. option is consul, etcd, etcdv3, zookeeper.
func SelectMode ¶ added in v1.0.1
Select mode of service. options is "RandomSelect","RoundRobin","WeightedRoundRobin","WeightedICMP","ConsistentHash","Closest".
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) SetHandlerFilter ¶ added in v1.0.2
func (r *Proxy) SetHandlerFilter(f filter)
Set a filter for client handler
func (*Proxy) SetRpcFilter ¶ added in v1.0.2
func (r *Proxy) SetRpcFilter(f filter)
Set a filter for rpc
func (*Proxy) SetRpcResponder ¶
func (r *Proxy) SetRpcResponder(resp rpc.RpcResponder)
Click to show internal directories.
Click to hide internal directories.